API - Authentication using OAuth Access Token

Purpose

To generate a token in order to interact with Sectona Management APIs

Endpoint: /API/APP/APP007/OAuthToken

HTTP METHOD

POST


Parameters

Parameters

Data Type

Required

Description

Accept

application/json

YES

application/json

Content-Type

application/json

No

application/json

cache-control

no-cache

No

no-cache

grant_type

password
client_credentials
refresh_token

Yes

password
client_credentials
refresh_token

client_id

username if grant_type is other than password

No

username if grant_type is other than password

client_secret

access token if grant_type is client_credentials
refresh token if grant_type is refresh_token

No

access token if grant_type is client_credentials
refresh token if grant_type is refresh_token

username

username if grant_type is password

No

username if grant_type is password

password

user password if grant_type is password

No

user password if grant_type is password

Sample Response (JSON)

{
    "Version":"6.0.0.0",
	"IsSuccess":true,
	"LogCode":"0",
	"Result":"
	{
		"access_token": "access_token",
		"token_type": "token_type",
		"issued_at": "issued_at",
		"expiry": "expiry",
		"error": "error",
		"error_description": "error_description"
	}",
	"StatusCode":"Accepted",
	"Timestamp":"03 Jun 2019 11:58:50 GMT 05:30:00"
}


Standard Error Response Codes

Error Code

Error Description

011649

Current user lacks permission to take this action

011651

The authorization header is either empty or not basic

011673

Invalid credentials

011674

Invalid credentials

011675

Unable to validate request

011683

Invalid instance name

011803

Unable to insert API log details

012235

Evaluation license expired