Get OAuth2 access token with client credentials
This endpoint is used to generate an access token using client credentials.
URL
POST https://api.vistanet.jp/auth/oauth/token
Sample URLs
https://{api-url}/auth/oauth/token
This access token is used at the partner-level for deleting the client’s first response policy.
Header | Value |
---|
Authorization | Bearer {accessToken} |
Content-type | application/octet-stream |
Accept | application/octet-stream |
Form Field | Description/Value |
---|
client_id | Client ID (key) |
client_secret | Secret Key generated along with token (secret). |
grant_type | Credentials of client. |
Status code
200 OK
Sample response
{
"access_token" : "6b4a5f03-7d49-4915-9792-2d964806cbd1",
"token_type" : "bearer",
"expires_in" : 5999,
"scope" : "read write"
}
Possible errors
Response code | Reason | Sample response |
---|
401 Unauthorized | For invalid/key combinations. | {"error": "unauthorized", "error_description": "Bad API credentials"} |
400 Bad Request | For invalid grant_type values. | {"error": "unsupported_grant_type", "error_description": "Unsupported grant type: user_password"} |