Nansen Query Documentation
Search…
⌃K
⚙

Access Token

How to retrieve the API access toke associated with your account
Note: For security reasons, access tokens are set to expire after ONE HOUR. Make sure you're using a valid token when making queries!
Authentication for Nansen Query API is done via an access token. A token generated is valid for one hour and can only be used for that duration. After one hour, a new token will be generated and will have to be retrieved in order to authenticate access to Nansen Query API.
The access token can be retrieved via the following code using your Nansen login credentials.
curl -i -H "Accept: application/json" \
-X POST \
-H "Content-Type: application/json" \
-d '{"email": "EMAIL", "password": "PASSWORD"}' \
https://zarya-backend-mediator-pidzqxgs7a-uc.a.run.app/auth
Upon a successful response, the following will be returned:
200 OK
{
"token": "TOKEN",
"uid": "UID"
}
The following error will be returned if the login credentials are incorrect, have expired, or do not have API access:
404 Not Found
{
"message": "Not Found"
}