This API returns the access token that used for calling other APIs.

URL Parameters

None.

Example Request

URL

For Production: POST https://accounts.avayacloud.com/oauth2/access_token
For Staging: POST https://onesnastaging.esna.com/oauth2/access_token

Headers

content-type: application/x-www-form-urlencoded

Form Parameters

KeyValue
client_secret[client_secret]
grant_typeauthorization_code
client_id[client_id]
redirect_uri[redirect_uri]
code[code]

Example Response

{
	"access_token": "76731740bc9341692e94de76d8f6d3553af56f04",
	"scope": "https://www.onesna.com/auth/userinfo.email https://www.onesna.com/auth/userinfo.profile https://www.onesna.com/auth/logan",
	"expires_in": 3599,
	"refresh_token": "86221e6c5d5259abd99b997bc40fbcf70187d444",
	"id_token": "eyJhbGciOiJIUZI1NiIsInR5CCI6IkpXVCJ9.eyJzdWIiOiJhZzl6Zm05dVpYTnVZWFJsYZNSCGJEZHLFUXNTQKZWelpYSVINSUNBd2NMNG5Bb00iLCJpc3MiOiJlc25hLmNvbSIsImV4CCI6MTU4ODk10TAxNCwiaWRfdG9rZW5fdmVyc2lvbiI6IjEUMCIsImlhdCI6MTU4ODk1NTQxNCwiZW1haWwiOiJtZUBY ZWRob3JzZS5iaXoiLCJhdWQiOiJjbGllbnRfaWQifq.ySo4uRz8VEBg5hlFXb6M4ixPQZ9COUTLsVSWwtorPX4"
}