Authentication
Issue token
Returns an access token and a refresh token for this API. The bearer access token enables you to get access and send requests to the endpoints in this API.
To get the tokens, you need to send a Client ID and a Client Secret, which you can obtain from the Service application in your project. First, create a Service app in your project (Project -> Settings -> Service apps).
To manage access rights to the API, select an appropriate access level for your app when creating the service app - Read, Operate, or Manage.
The Bearer access token is a text string, included in the request header, for example:
curl -X GET https://api.emma.ms/external/v1/locations -H "Authorization: Bearer YOUR-ACCESS-TOKEN-HERE"
post/v1/issue-token
Request
- Base URLhttps://api.emma.ms/external
- Authnone declared
Request body
Example request
{
"clientId": "ad6f8c5c-223f-4102-8664-8044b84864e2",
"clientSecret": "e0eb8a09-b7fe-4acc-a72b-79ce0dd26068"
}Response
Successful operation
Example response
{
"accessToken": "eyJhbGcih3In0.eyJleHAiOjE3MDA2Mzc4NjksImlhdCI6MTcwMDYzNzU2OSwianRpIjoiYTMwOGRhMDItYmIwNy00MjVkLTk2NzUtNzFiMjczNzdkMjYxIiwiaXNzIjoiaHR0cHM6Ly9hdXRoLmVtbWEubXMvYXV0aC9yZWFsbXMvZW1tYSIsImF1ZCI6ImFjY291bnQiLCJzdWIiOiIzMDg1YzdlOS1kYjExLT.VCXC-D43-8zp7FVYSNgbbz8KUASAWlFcCqj6wJwif_FReGSIofgDoya54bIBPEugVq0Is7TmbBaXCzkEEASxkMxrCg7r6-7XBWC3P5w8It8Kc-wdVRgjVGSnzz4B8hA",
"expiresIn": 300,
"refreshExpiresIn": 1800,
"refreshToken": "eyJhIwOGIyYi00YzgwLTQ5NTQtODY4Ni02YmY2OWJiYjg0ZjcifQ.eyJleHAiOjE3MDA2MzkzNjksImlhdCI6MTcwMDYzNzU2OSwianRpIjoiYTIxMjRmZWQtODA5MS00ZDAyLTljtYXBpIiwic2Vzc2lvbl9zdGF0ZSI6IjMzZmNlMWQzLWM1MWUtNDY5Zi1iMmNiLTQ0YzY3YjRmNTEyZSIsInNjb3BlIjoidXNlckF0dHJpYnV0ZSBw",
"tokenType": "Bearer",
"notBeforePolicy": 1668610246,
"sessionState": "33fce1d3-c51e-469f-b2cb-44c67b4f512e"
}Changes
No recorded changes to this operation across all 1 revision of this API.