Skip to content

Create a credential

Request

Creates a credential, a client ID and secret for the caller's organization, with the scopes of the chosen scopesPreset: FullAccess or ReadOnly. The response holds the client secret, the token URL and the audience. The secret is shown once: Talli does not store it. The name is 1 to 128 characters, not only whitespace, with no control characters. It is stored as sent and must be unique in the organization, case included. Returns 409 with error code CREDENTIAL_LIMIT_REACHED when the organization already has 2 credentials, the maximum, and CREDENTIAL_NAME_TAKEN when another credential has the name. A call with the token of a credential that no longer exists gets 403 with error code CALLER_CREDENTIAL_NOT_FOUND. Returns 502 when the credential could not be created; retry the call.

Security
oauth2(Required scopes: credentials:manage)
Bodyapplication/jsonrequired
namestring
scopesPresetstring(CredentialScopesPreset)
Enum:"FullAccess""ReadOnly"
curl -i -X POST \
  https://docs.talli.ai/_mock/referencev3/swagger/v3/distribution-manager/credentials \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "string",
    "scopesPreset": "FullAccess"
  }'

Responses

Created

Bodyapplication/json
clientIdstring
namestring
scopesPresetstring(CredentialScopesPreset)
Enum:"FullAccess""ReadOnly"
scopesArray of strings
createdOnstring, (date-time)
updatedOnstring, (date-time)
secretRotatedOnstring or null, (date-time)
clientSecretstring
tokenUrlstring
audiencestring
Response
{ "clientId": "string", "name": "string", "scopesPreset": "FullAccess", "scopes": [ "string" ], "createdOn": "2019-08-24T14:15:22Z", "updatedOn": "2019-08-24T14:15:22Z", "secretRotatedOn": "2019-08-24T14:15:22Z", "clientSecret": "string", "tokenUrl": "string", "audience": "string" }