To use the EMnify API, you need to authenticate it with an Authentication Token. We use JWTs as the authentication token.
Now there are two ways to retreive this token:
Authenticate with User Credentials: You can use the username and password you used while signing up for the EMnify Portal.
Authenticate with an Application Token: You can use the application token that you can generate in your EMnify account.
The following pages cover the basics of authentication steps, querying resources and also how to create and use Application Tokens for automating or scheduling recurring tasks.
/api/v1/authenticate API takes a username and password and returns an
refresh_token upon successful login. The auth token is then used to authenticate all subsequent calls to the API via the Authorization header.
/api/v1/authenticate API is sent an application token instead of user credentials, it returns an auth token used to authenticate all subsequent calls to the API via the
JSON Web Tokens are used as a secure mechanism to authenticate all API calls via the Authorization header. This page describes how to obtain a JWT
auth_token and how they are used in requests.
It is recommended to use application tokens for M2M communications as this does not involve leaving user credentials on an application server or devices which have programmatic API access. Other advantages of Application Tokens is that multiple tokens may be created, their use can be segmented by limiting them to a specific application each, restricted by IP, and they may be revoked at any time on a per-token basis.