Skip to main content

Authentication

Sentry Interactive uses tokens to permit access to the API. Sentry Interactive expects for the token to be included in all API requests to the server in a header that looks like the following:

Authorization: Bearer TOKEN

info

You must replace TOKEN with your authentication token.

Authentication tokens are JSON Web Tokens (JWT) loosely using the OpenID format, they can be examined to determine their expiry date, the user's ID. JSON web tokens are split into three sections separated by a ., the header, payload and signature - each section can be BASE64URL decoded to read further.

Sentry Interactive understands the following OpenID fields in the auth token payload:

FieldMandatoryDatatypeDescription
subYesString <= 1024 bytesUnique identifier for the user
issYesURIURI of application responsible for issuing this token
expYesEpoch TimestampTimestamp in seconds at when this token will be considered invalid
iatYesEpoch TimestampTimestamp in seconds when this token was issued and the data within loaded
auth_timeNoEpoch TimestampTimestamp in seconds when the user last authenticated
audYesURI or list of URIsMust include https://api.doordeck.com
sidNoStringSession identifier
emailNoStringUser's email address
email_verifiedNo (Defaults to false)BooleanFlag to specify if the user's email has been verified
telephoneNoE.164User's phone number
telephone_verifiedNo (Defaults to false)BooleanFlag to specify if the user's phone number has been verified
localeNoBCP 47User's locale (e.g. en-US)
zoneinfoNoTimezoneTimezone of user, e.g. Europe/London
nameNoStringUser's full name
family_nameNoStringUser's family name
middle_nameNoStringUser's middle name
given_nameNoStringUser's given name
pictureNoURIUser's profile picture

Authentication tokens can be issued directly by Sentry Interactive using the login endpoint or by third-party application developers using pre-registered asymmetric authentication keys.