Download OpenAPI specification:Download
This documentation describes how to authenticate with Assemble API using JSON Web Tokens.
Click here to view the JWT authentication guide.
Generate a pre-authentication token.
A pre-authentication token is a temporary token which is generated from a set of credentials and can then be used to generate a JSON Web Token using the /auth/api/token endpoint.
email required | string <email> Email address of the user you are trying to authenticate |
password required | string Password of the user are you trying to authenticate |
token required | string The pre-authentication token |
expires_at required | string <date-time> Date and time the pre-authentication token will expire |
two_factor required | string or null Enum: "email" "sms" "auth_app" "magic_link" Two factor authentication method |
{- "email": "john@example.com",
- "password": "SuperSecurePassword123"
}
{- "token": "string",
- "expires_at": "2017-07-21T17:32:28Z",
- "two_factor": "email"
}
Create a JSON Web Token which can be used to access authenticated endpoints.
In order to generate a JSON Web Token, you must first generate a pre-authentication token.
token required | string Pre-authentication token |
minimal | boolean Determine if we should generate a minimal version of the JWT token |
key | string or null Two factor authentication key generated from the users two factor method |
token required | string JSON Web Token |
{- "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwiZGlzcGxheV9uYW1lIjoiSm9obiBEb2UiLCJpYXQiOjE1MTYyMzkwMjJ9.Boca2nntRviOO8IdiP4CZPnMmwZZ5be4Zoen60PswDo",
- "minimal": true,
- "key": "369741"
}
{- "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwiZGlzcGxheV9uYW1lIjoiSm9obiBEb2UiLCJpYXQiOjE1MTYyMzkwMjJ9.Boca2nntRviOO8IdiP4CZPnMmwZZ5be4Zoen60PswDo"
}
Refresh an existing JSON Web Token.
Your JSON Web Token should be sent in the body of the request.
You cannot refresh a JSON Web Token more than once. If your JSON Web Token becomes blacklisted, you will need to generate a new pre-authentication token and JSON web token.
token required | string Expired JSON Web Token |
minimal | boolean Determine if we should generate a minimal version of the JWT token |
token | string JSON Web Token |
{- "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwiZGlzcGxheV9uYW1lIjoiSm9obiBEb2UiLCJpYXQiOjE1MTYyMzkwMjJ9.Boca2nntRviOO8IdiP4CZPnMmwZZ5be4Zoen60PswDo",
- "minimal": true
}
{- "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwiZGlzcGxheV9uYW1lIjoiSm9obiBEb2UiLCJpYXQiOjE1MTYyMzkwMjJ9.Boca2nntRviOO8IdiP4CZPnMmwZZ5be4Zoen60PswDo"
}