Service Authentication API
Generate access token using API secret Key
Register your service on Entity Studio Developer Dashboard and generate your API secret Key before proceeding.
Once the API secret key is generated, you can use the API below to generate a new access token. Just pass your API secret Key in X-Api-Secret-Key
header to generate access token. The access_token
is required to access all SSI APIs. Read the next section for more details.
post
Header parameters
X-Api-Secret-KeystringRequired
Provide Api Secret key to get access token
OriginstringOptional
Origin as you set in application cors
Responses
200
AccessToken generated
application/json
400
Error occured at the time of generating access token
application/json
401
Unauthorized
application/json
post
POST /api/v1/app/oauth HTTP/1.1
Host:
X-Api-Secret-Key: text
Accept: */*
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6IjRkNjhmMjNmLTcwZjQtNDFhZC1hMGViLTU3MjA4YTZlOTcxMSIsImFwcFNlY3JldCI6IjNjN2NiNTY1LTZmNWQtNGY2MC1hMjQ2LTZhOGFjYWVhMmY0MyIsImdyYW50VHlwZSI6ImNsaWVudF9jcmVkZW50aWFscyIsImlhdCI6MTY3NDAyMDY3NCwiZXhwIjoxNjc0MDM1MDc0fQ.P-AbheTJMxQNGLTkGWOsnct4M0nKCd-7oUFGqMCpIDM",
"tokenType": "Bearer",
"expiresIn": 14400
}
Once you generated the accessToken
, you can pass this token as bearer authorization token in the header for all APIs.
Last updated