Anonymous Token
Was this helpful?
Was this helpful?
Sends an authentication request and returns an anonymous token. This operation causes creation of a new session-context document.
Anonymous token is valid for one hour. After that time it should be refreshed in order to keep the same session ID associated.
Name of the tenant.
Note: Name of the tenant is always written in lowercase.
{tenant}
Your Emporix API key - client ID.
{client_id}
GET /customerlogin/auth/anonymous/login HTTP/1.1
Host: api.emporix.io
Accept: */*
The request was successful. An anonymous token is returned.
{
"token_type": "Bearer",
"access_token": "tpYgJPZqddEQ2zwfzNtx79noBP65",
"expires_in": 3599,
"refresh_token": "7FnviYrxvQWYdzUVBVTvXeNAA4Jy1HPe",
"refresh_token_expires_in": 86399,
"sessionId": "6d4d4d5e-04b9-40c5-9074-4df1405c6081",
"scope": "tenant={tenant}"
}
Sends an authentication request and returns new anonymous token with same session ID attached.
This operation causes update of a session-context document with given session ID.
Anonymous token is valid for one hour. After that time, another refresh anonymous token request should be sent.
Name of the tenant.
Note: Name of the tenant is always written in lowercase.
{tenant}
NOTE: It's recommended to use refresh_token
parameter instead. Anonymous token that needs to be refreshed so that the same session ID will be kept. Provide the value of the access_token
you get in response to requesting a token request.
{GOToGKaEKFyR8DokPBwHH0Y3AKCo}
A refresh token generated when the anonymous token is created.
{7FnviYrxvQWYdzUVBVTvXeNAA4Jy1HPe}
Your Emporix API key - client ID.
{client_id}
GET /customerlogin/auth/anonymous/refresh HTTP/1.1
Host: api.emporix.io
Accept: */*
The request was successful. An anonymous token is returned.
{
"token_type": "Bearer",
"access_token": "tpYgJPZqddEQ2zwfzNtx79noBP65",
"expires_in": 3599,
"refresh_token": "7FnviYrxvQWYdzUVBVTvXeNAA4Jy1HPe",
"refresh_token_expires_in": 86399,
"sessionId": "6d4d4d5e-04b9-40c5-9074-4df1405c6081",
"scope": "tenant={tenant}"
}