Authentication

Our REST API uses a simple token-based HTTP Authentication scheme.

To authenticate, the token key should be included in the Authorization HTTP header. The key should be prefixed by the string literal "Token", with whitespace separating the two strings. For example:

Authorization: Token c564288ed9694309a96761909a12706f

Unauthenticated responses that are denied permission will result in an HTTP 401 Unauthorized response with an appropriate WWW-Authenticate header. For example:

WWW-Authenticate: Token

The curl command line tool may be useful for testing token authenticated APIs. For example:

curl -X GET https://api.getanewsletter.com/v3/ -H 'Authorization: Token c564288ed9694309a96761909a12706f'

Obtaining a token

To obtain a token you need to log in to your account, navigate to "Contacts > API & Forms" and then click on the link "Add token". This action will take you to a new page where you can give the token a name and description. This will help you to separate your different tokens if you have more than one. To read more about how to use the token see the section above, "Authentication".

Step-by-step

  1. Log in to your account
  2. Navigate to "Contacts > API & Forms"
  3. Click the link "Add token".
  4. Enter a name and a description for your token.
  5. Congratulations, your token has been created!