First Steps

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:

  1. Authenticate with User Credentials: You can use the username and password you used while signing up for the EMnify Portal.

  2. 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.

User Authentication

The /api/v1/authenticate API takes a username and password and returns an auth_token and refresh_token upon successful login. The auth token is then used to authenticate all subsequent calls to the API via the Authorization header.

Authenticate with User Credentials!
Application Authentication

When the /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 Authorization header.

Authenticate with an Application Token!
JWTs

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.

See how JWTs are used!