Grant access using client credentials

post/oauth/token
Internal-Use Only

Obtains an access token based on client credentials that have been granted to the registered client application. The SAS Logon service verifies the supplied client credentials. If they are valid, an access token is returned. Obtaining access tokens via client credentials grant works only with SAS Viya APIs that do not enforce authorization.

Request Samples

1

Response Samples

1{
2 "access_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6ImxlZ2FjeS10b2tlbi1rZXkiLCJ0eXAiOiJKV1QifQ.eyJqdGkiOiIzMjJmZGIyOTAyYzg0YTUxYTY2N2I5MGI5OWZhMWYwNiIsInN1YiI6ImFwcCIsImF1dGhvcml0aWVzIjpbInVhYS5ub25lIl0sInNjb3BlIjpbInVhYS5ub25lIl0sImNsaWVudF9pZCI6ImFwcCIsImNpZCI6ImFwcCIsImF6cCI6ImFwcCIsImdyYW50X3R5cGUiOiJjbGllbnRfY3JlZGVudGlhbHMiLCJyZXZfc2lnIjoiNjY4ZjYzYjkiLCJpYXQiOjE1MjIxNjY2MTEsImV4cCI6MTUyMjIwOTgxMSwiaXNzIjoiaHR0cHM6Ly9leGFtcGxlLnNhcy5jb20vU0FTTG9nb24vb2F1dGgvdG9rZW4iLCJ6aWQiOiJ1YWEiLCJhdWQiOlsiYXBwIl19.VPuBsB2Yod-OKtt87nhjPFlkkhG3eN48CvFkbxvWli5hDYMihTmTBVTSuAAdqaZoesNwSICYWmjBbS0FJkIp5kNKxuxb8sEtwUa8zVS5FZy0D9Ocir1mS5Fgz7ox0u6YQDXKe_mC6tij8YaYzRxJiS-fcVe6vCaRjXHbIRqVQ3U",
3 "token_type": "bearer",
4 "expires_in": 43199,
5 "scope": "uaa.none",
6 "revocable": false,
7 "jti": "322fdb2902c84a51a667b90b99fa1f06"
8}

Header Parameters

NameTypeRequiredDescription
Authorization
string
false

The basic authorization header containing the registered OAuth client identifier and secret. Optional if this information is passed as part of the form data.

Request Body

NameTypeRequiredDescription
client_id
string
false

The client identifier for the registered OAuth client and recipient of the token. Optional if this information is passed as part of the Authorization header.

client_secret
string
false

The client secret for the registered OAuth client. Optional if this information is passed as part of the Authorization header.

grant_type
string
true

The type of authentication used to obtain the token. In this case, 'client_credentials'.

scope
string
false

The space-limited list of scopes. Defaults to get all the authorities registered to the client.

Responses

StatusMeaningDescription
200OKThe request succeeded.Schema