Get an API token
Returns an API token for the given API application
Try this request in your browser
URL
https://api.natterly.com/api/v1/authentication/get_api_token
Access
Must not be authenticated.
If not authorised, a MustNotBeAuthenticated
error will be returned.
Parameters
Parameter | Type | Default |
---|---|---|
application Required The application's token |
String | null |
account Required The subdomain of the account |
String | null |
email_address Required The user's e-mail address |
String | null |
password Required The user's password |
String | null |
scope The scope for this API token (required for issuing multiple tokens to the same application) |
String | null |
description A description to set for the token that is returned |
String | null |
two_factor_code The two factor authentication code for this user (required if user has two factor auth) |
String | null |
Errors
Error | Attributes |
---|---|
InvalidApplication The application token provided was not accepted |
|
InvalidAccount The account name provided was invalid |
|
InvalidUser The user credentials provided were invalid |
|
LoginLocked Login is currently blocked for this account or IP. Try again later. |
|
TwoFactorRequired Two factor authentication is enabled for this account. A `two_factor_code` is required. |
|
TwoFactorIncorrect The two factor authentication code provided is not valid. |
|
AccountTwoFactorRequired The account requires two factor authentication but user has not enabled it. Users should login to the admin console to enable this. |
|
TwoFactorLocked Too many attempts to verify a two factor auth code. No further attempts are permitted for now. |
|
AccountNotValidForApplication The authenticated application is not permitted to generate tokens for the provided account |
|
InvalidNetwork The network you are accessing the API from is not permitted to access this account |
|
Response Data
This action will return a Hash.