Auth0 - Generate token

Receives user authentication events from Auth0 post-login/post-registration action. Creates a new customer or updates existing customer data (if changes detected). Generates Cleeng access token (JWT) with configurable expiration.

Authorization: Requires Bearer token (JWT). The token value must match the secret in publisher configuration.

Request body

  • Send one JSON object per request.
  • If the body contains characters after the JSON object, the endpoint returns 400 ID0001.
Stored values outside field limits
  • A stored customer value can exceed the limits in Body Params.
  • If the request sends that value unchanged, the endpoint returns 400 ID0001 on every login.
  • To resolve the error, correct the value in Auth0 or in Cleeng.
Response time
  • The endpoint responds within approximately 20 s.
  • If processing exceeds approximately 18 s, the endpoint returns 504 ID2112.
Retrying failed requests
  • 502 ID2111: Safe to retry the request.
  • 504 ID2112: Safe to retry the request.
  • 409 ID2113: Safe to retry the request once.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Errors

HTTP Status codeError CodeReasonMessage Example
400ID0001invalid_payloadValidation failed
400ID0001invalid_payloadInvalid JSON payload
401ID2001unauthorizedBearer token extraction failed
401ID2001unauthorizedInvalid auth token signature
401ID2001unauthorizedInvalid token claims
401ID2001unauthorizedMissing or invalid publisherId in token
409ID2104identity_mismatchauth0 identity mismatch
409ID2106external_id_conflictCustomer external ID already in use
409ID2107email_conflictCustomer email already in use
409ID2108identity_conflictAuth0 identity already linked to another customer
409ID2113customer_not_foundCustomer not found for this publisher
422ID2109invalid_emailCustomer email rejected as invalid
422ID2110invalid_customer_dataCustomer data rejected as invalid
500ID0002internal_errorInternal server error
500ID2101customer_lookup_failedFailed to get customer by identity
500ID2102customer_create_failedFailed to create customer
500ID2103customer_update_failedFailed to update customer
502ID2111upstream_errorUpstream service error
503ID2100config_not_foundPublisher configuration not found
503ID2105integration_disabledAuth0 integration is not active for this publisher
504ID2112upstream_timeoutUpstream service timeout

Body Params
string
required

Auth0 user identifier (typically "auth0|{sub}" format from Auth0 user object). Example: auth0|1234567890

string
required

User email address (must contain @). Example: [email protected]

string

User first name. Max 50 characters. Must not contain http://, https://, ftp://, mailto:, javascript: or www.. Example: John

string

User last name. Max 50 characters. Must not contain http://, https://, ftp://, mailto:, javascript: or www.. Example: Smith

string
required

User locale (language_COUNTRY format). Example: en_US

string
required

ISO 3166-1 alpha-2 country code. Example: US

string
required

ISO 4217 currency code, exactly 3 uppercase letters. Example: USD

string
required

User IP address (validated as valid IPv4 or IPv6). Example: 192.168.1.1

int64

Optional Unix timestamp (seconds since epoch) when the access token should expire. Must be in the future. If not provided, uses the publisher's default accessTokenExpiration configuration. Example: 1736870400

string

Customer's external ID. Omitting it doesn't fail the request. It falls back to auth0Id as an identifier.

Max 100 characters, ASCII only

Responses

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json