Generate an API token
Call this endpoint twice to generate an API token.
- Request a 2FA token. Send your
username,password, andmethod: token. A two-factor authentication (2FA) token is emailed to the address on your account. - Exchange the 2FA token for an API token. Send the same credentials again and add the
twofa_tokenfrom the email. The response contains your API token. - Use the API token. Send it as the value of the
x-api-keyheader on every authenticated request.
Select a request body variant below to see the fields for step 1 or step 2.
Request
This endpoint expects an object.
twofa_token_request
Step 1: request a 2FA token. Omit twofa_token on this call. The 2FA token is emailed to the address on your account.
OR
api_token_request
Step 2: exchange the emailed 2FA token for an API token. Send the same credentials as step 1 and add twofa_token.
Response
Successful operation
twofa_token_response
Step 1 response. Confirms that a 2FA token was emailed.
OR
api_token_response
Step 2 response. Contains the API token to send in the x-api-key header.
Errors
400
Bad Request Error