EMnify is hiring. Visit our careers page to see our open positions, and apply today!
    Dec, 4 2020

    How to use an Application Token for API authentication?

    Developer Blog

    Each time you want to use the EMnify API, you need to authenticate. You can do so with your EMnify credentials or with an Application Token which is more secure. Here are the steps:

    1. Create an Application Token on the EUI;
    2. Generate an Authentication Token based on the application token;
    3. Use the Authentication Token for all other API

    1. Create an Application token on the EMnify User interface 

    • Click on this symbol    in the right corner of the EUI.
    • Select "Create New Application Token"
    • Save the application token in a secure place 

    2. Generate an Authentication Token from Postman

    You can use the Application Token to create an Authentication Token in Postman, which you will then use to run any other EMnify API as explained here.

    Once the application token is created, you can use it to generate an authentication token. Log in Postman, copy the application token as below and send the following API call. It will create an application token visible in the response body.

    To automate authentication, you will have to create a variable with the authentication token from the response body. A new variable called: "Auth_Token" will be created. 

    API Call

    POST https://cdn.emnify.net/api/v1/authenticate


    Content-Type: application/json


    First of all click on "Raw,

    insert the body below :  





    var jsonData = JSON.parse(responseBody);

    Response: status  200 OK




    Note: Do not forget to save this request in order to refresh the authentication token for the following connections.

    3. Use the Authentication Token for the following API requests

    For demo purposes, we will integrate into the authentication token in the API call to GET the Endpoint Collection. The steps will be the following : 

    1. Send Authentication API with Application token to refresh authentication token (cf. above)
    2. Send the following API call to retrieve endpoint collection with the Auth token

    API Call

    GET https://cdn.emnify.net/api/v1/endpoint?page=1&per_page=20&sort=id


    Content-Type: application/json

    Authorization: Bearer

    Response: status  200 OK

        "id": 1,
        "name": "arduino01",
        "tags": "arduino, meter, temp",
        "created": "2014-08-01T08:47:00+00:00",
        "last_updated": "2016-02-29T14:02:47.000+0000",
        "status": {
          "id": 1,
          "description": "Disabled"
        "service_profile": {
          "id": 1,
          "name": "Smart Meter"
        "tariff_profile": {
          "id": 3,
          "name": "Domestic only"
        "sim": {
          "id": 788,
          "iccid": "7368267365454773621",
          "imsi": "90199123565690",
          "msisdn": "+885637486456"
        "imei": "8645454889321",
        "imei_lock": true,
        "ip_address": "",
        "ip_address_space": {
          "id": 2

    From now on, you can use the EMnify API library. Do not forget to integrate the authentication token for each of your API calls.


    Subscribe to our Developer Newsletter


    Jean-Eudes Ambroise

    Jean-Eudes is Director of Customer Success at EMnify. He's been working in the industry since 2017 and is an IoT expert.