Skip to main content
POST
CreateApiKey

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

The request for a call to ApiKeyService.CreateApiKey.

The request for a call to ApiKeyService.CreateApiKey.

name
string
required

The name for the new ApiKey. Required.

userId
string
required

The id of the user the new key will authenticate as. Must equal the id of the calling user; creating an API key on behalf of another user is no longer supported and the service will return INVALID_ARGUMENT if the values differ. The field is retained for backwards compatibility with existing clients and may be marked deprecated in a future revision.

Response

A successful response.

apiKey
CreatedApiKey includes the key, which will only be returned on creation, so having a separate type makes the "never return the key a second time" semantics clear · object
required