Skip to content
innovorder
⌘K

Identity & access

Authentication

System map · OAuth access
Credentials
Access token
API request

Authentication is handled via OAuth-style bearer tokens. Access tokens are valid for 24 hours (14 days when rememberMe is set to true). When a token expires, the API responds with a 401 error (token_expired): authenticate again via this endpoint to obtain a new token. Tokens should be stored securely.

Login

POST/oauth/loginRequest Access Token

Exchange your credentials for an access token.

Request Body

json
rememberMe=true
username=myEmail@emailProvider.com
password=myPassword
grant_type=password
Request Body Properties

Every field in the example is listed below. Explicit requiredness is shown when the endpoint contract defines it.

PropertyTypeExampleDescription
rememberMebooleantrueThe remember me value.
usernamestringmyEmail@emailProvider.comThe username value.
passwordstringmyPasswordThe password value.
grant_typestringpasswordThe grant type value.

Response

json
{
  "access_token": "eyJhbGciOiJIUzI1...",
  "status": 201,
  "code": "token_created",
  "message": "You have successfully logged in.",
  "data": {
    "user": {
      "userId": 1,
      "email": "user@example.com",
      "role": "brand",
      "brandId": 100
    }
  },
  "token_type": "Bearer"
}
Response Properties

Every field in the example is listed below. Explicit requiredness is shown when the endpoint contract defines it.

PropertyTypeExampleDescription
access_tokenstring"eyJhbGciOiJIUzI1..."The access token value.
statusinteger201HTTP status code returned by the API.
codestring"token_created"Machine-readable application code for the result.
messagestring"You have successfully logged in."Human-readable result message. Do not use this value for program logic.
dataobject{…}Endpoint-specific response payload.
data.userobject{…}Object containing user fields.
data.user.userIdinteger1Identifier of the user.
data.user.emailstring"user@example.com"Email address.
data.user.rolestring"brand"The role value.
data.user.brandIdinteger100Identifier of the brand.
token_typestring"Bearer"The token type value.

Using the Token

Include the token in the Authorization header of subsequent requests:
Authorization: Bearer <token>