1. Home
  2. Docs
  3. Mavryx API Reference
  4. Authorization
  5. Token types

Token types

The Mavryx API distinguishes three types of tokens depending on the scenario:

TypeAccess Description
Application token
(the application acts on its behalf)
It has access only to application data.Backend application storing the token securely on the server side (may have high permissions).
User-acting application token
(the application acts on behalf of the user)
It has access to both application and user data.
Frontend/backend application storing the token securely on the server side (may have high permissions) or publicly (reduced permissions, such as viewing certain elements only).
User tokenIt has access only to user data.Frontend application with reduced permissions.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication/authrization will also fail.

{
  "alg": "RS256",
  "typ": "application/oauth2+access_token+jwt"
}

Application token

{
  "jti": "befd7808-1250-4ee1-90bb-6a179ac49517",
  "iss": "auth-dev.mavryx.solutions",
  "aud": [
    "*.mavryx.solutions",
    "*.mavryx.software"
  ],
  "nbf": 1712143670,
  "iat": 1712143670,
  "exp": 1712147270,
  "sub": "auth-dev.mavryx.solutions/client/069aa47b-1dd8-4273-80ba-1b4dadea8ff4",
  "mrx_cid": "ee25b904-e0fe-4d91-9913-85d1496a8765",
  "mrx_typ": "application",
  "scope": [
    "app:me:*"
  ]
}
Field NameTypeRelatedDescription
jtiMavryx/Types/UuidToken identifier
issMavryx/Types/StringWho generated the token
audMavryx/Types/ArrayWho the token is intended for
nbfMavryx/Types/IntegerThe time (Unix Epoch time) from which the token can be used
iatMavryx/Types/IntegerThe time (Unix Epoch time) when the token was generated
expMavryx/Types/IntegerThe expiration time (Unix Epoch time) of the token
subMavryx/Types/StringFor whom the token was generated
scopeMavryx/Types/ArrayList of scopes
mrx_cidMavryx/Types/UuidMavryx/ClientClient ID for which the token was generated
mrx_typMavryx/Types/StringToken type, user,application

User-acting application token

{
  "jti": "befd7808-1250-4ee1-90bb-6a179ac49517",
  "iss": "https://auth-dev.mavryx.solutions",
  "aud": [
    "*.mavryx.solutions",
    "*.mavryx.software"
  ],
  "nbf": 1712143670,
  "iat": 1712143670,
  "exp": 1712147270,
  "sub": "https://auth-dev.mavryx.solutions/client/069aa47b-1dd8-4273-80ba-1b4dadea8ff4",
  "mrx_cid": "ee25b904-e0fe-4d91-9913-85d1496a8765",
  "mrx_uid": "f8874230-737a-4f05-bd7c-c6b8e014cc10",
  "mrx_typ": "user",
  "mrx_votp": true,
  "scope": [
    "app:me:*",
    "account:me:*"
  ]
}
Field NameFull nameTypeRelatedDescription
jtiJson Token IDMavryx/Types/UuidToken identifier
issIssuerMavryx/Types/StringWho generated the token
audAudienceMavryx/Types/ArrayWho the token is intended for
nbfNot beforeMavryx/Types/IntegerThe time (Unix Epoch time) from which the token can be used
iatIssued atMavryx/Types/IntegerThe time (Unix Epoch time) when the token was generated
expExpire atMavryx/Types/IntegerThe expiration time (Unix Epoch time) of the token
subSubjectMavryx/Types/StringFor whom the token was generated
scopeScopeMavryx/Types/ArrayList of scopes
mrx_cidClient IDMavryx/Types/UuidMavryx/ClientClient ID for which the token was generated
mrx_uidUser IDMavryx/Types/UuidMavryx/UserUser ID for which the token was generated
mrx_typToken typeMavryx/Types/StringToken type
mrx_votpMFAMavryx/Types/BooleanPass MFA

User token

{
  "jti": "befd7808-1250-4ee1-90bb-6a179ac49517",
  "iss": "https://auth-dev.mavryx.solutions",
  "aud": [
    "*.mavryx.solutions",
    "*.mavryx.software"
  ],
  "nbf": 1712143670,
  "iat": 1712143670,
  "exp": 1712147270,
  "sub": "https://auth-dev.mavryx.solutions/user/f8874230-737a-4f05-bd7c-c6b8e014cc10",
  "mrx_uid": "f8874230-737a-4f05-bd7c-c6b8e014cc10",
  "mrx_typ": "user",
  "mrx_votp": true,
  "scope": [
    "account:me:*"
  ]
}
Field NameFull nameTypeRelatedDescription
jtiJson Token IDMavryx/Types/UuidToken identifier
issIssuerMavryx/Types/StringWho generated the token
audAudienceMavryx/Types/ArrayWho the token is intended for
nbfNot beforeMavryx/Types/IntegerThe time (Unix Epoch time) from which the token can be used
iatIssued atMavryx/Types/IntegerThe time (Unix Epoch time) when the token was generated
expExpire atMavryx/Types/IntegerThe expiration time (Unix Epoch time) of the token
subSubjectMavryx/Types/StringFor whom the token was generated
scopeScopeMavryx/Types/ArrayList of scopes
mrx_uidUser IDMavryx/Types/UuidMavryx/UserUser ID for which the token was generated
mrx_typToken typeMavryx/Types/StringToken type
mrx_votpMFAMavryx/Types/BooleanPass MFA
Was this article helpful to you? No Yes

How can we help?