Application tokens
To retrieve the necessary authentication token to use the emnify REST API, you must use an application token generated in your emnify account.
Application tokens are recommended for M2M communications as this doesn’t involve leaving user credentials on an application server or devices with programmatic API access. Other advantages of application tokens are that you can create multiple tokens, restrict their use to a specific IP address range or application, and configure an expiration date, after which the token is automatically revoked. Application tokens can also be revoked at any time on a per-token basis.
Create an application token
You can create an application_token via POST request to /api/v1/application_token.
The application token can be revoked at any time.
You can also create and view application tokens in the emnify Portal. For step-by-step instructions, see Application tokens.
Authenticate with an application token
Once you create an application token, use /api/v1/authenticate to generate a JWT auth_token that authenticates subsequent API calls.
The server only returns an auth_token. There’s no refresh_token included
in the response.