Besides accessing Insights metrics through Admin Portal, Insights Premium users can access their metrics using API.

To read about the available metrics, categories, and their limitations, refer to the general Insights API documentation.


To authenticate to the Insights API, follow these steps:

  1. Set environment variables.

    Provide the login details required to authenticate to the Admin Portal URL.

    Set TOKEN to an empty value that will be filled in automatically once you are granted the authentication token in further steps.

    LOGIN: <Admin Portal e-mail>
    PASSWORD: <Admin Portal password>
  2. Get the token.

    Request a token by calling the URL.

    curl --location --request POST '' \
    --header 'Content-Type: application/json' \
    --data-raw '{
    "email": "'$LOGIN'",
  3. Save the token.

    Get a token in response and add it to environment variables.

    RESPONSE=$(curl -s --location --request POST '' \
    --header 'Content-Type: application/json' \
    --data-raw '{
    "email": "'$LOGIN'",
    echo $RESPONSE
    export TOKEN=$(echo $RESPONSE | jq -r .result.token)