Skip to content

API Login

You can login using your credentials and a simple call:

POST https://api.nearit.com/auth

{           
    "data" : {
        "type" : "authorization",
        "attributes": {
            "email" : "user@email.com",
            "password" : "XXXXXXXX"
        }
    }
}

The login call will return a token that you can use to call our APIs.

{
     "data" : {
        "id" : "token",
        "type" : "authorization",
        "attributes" : {
            "token" : "xxxxxxxx"
        }
     }
}

Headers

Your token must be used as "Authorization" http header.
Please remember to also include X-API-Version, Content-Type and Accept headers in every call.

Authorization: Bearer xxxxxxxx
X-API-Version: 2
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json

Attention: The token will expire after 24 hours.


Complete reference

For more details about NearIT auth system please look at the NearIT Accounts APIs reference.