Welcome to the Hapn public API.

In order to issue requests to the API, you must receive your clientId and clientSecret from customer success.

Receiving an Authorization Token

Issue a request to the following endpoint to receive a bearer token:

curl --location --request POST 'https://auth.usehapn.com/oauth2/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials&client_id=CLIENT_ID&client_secret=CLIENT_SECRET'


    "access_token": "ACCESS_TOKEN"
    "token_type": "Bearer",
    "expires_in": 3600

This token is valid for one hour. Once received, attach this token to further requests in the Authorization header:

curl --request GET \
     --url https://api.iotgps.io/v1/devices \
     --header 'Authorization: Bearer ACCESS_TOKEN' \
     --header 'Accept: application/json'