Request an access token

post

https://iam.sbc.com/console/auth/realms/sbc/protocol/openid-connect/token

This operation authenticates the supplied credentials and returns the access and refresh tokens. The access token can be used as authorization bearer token to make REST API calls. The refresh token can be used to obtain a new access token if the old access token expires.

Request

There are no request parameters for this operation.

Supported Media Types
Request Body - application/x-www-form-urlencoded ()
Root Schema : schema
Match One Schema
Show Source
Nested Schema : AccessTokenRequest
Type: object
Credentials for the token request
Show Source
Example:
{
    "client_id":"cnsbc-api-access",
    "username":"foo",
    "password":"bar",
    "grant_type":"password"
}
Nested Schema : RefreshTokenRequest
Type: object
Credentials for the refresh token request
Show Source
Example:
{
    "client_id":"cnsbc-api-access",
    "refresh_token":"eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lk",
    "grant_type":"refresh_token"
}
Back to Top

Response

Supported Media Types

200 Response

Successful Access Token Request
Body ()
Root Schema : TokenResponse
Type: object
Contains information related to the access token response
Show Source
Example:
{
    "access_token":"eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia",
    "expires_in":900,
    "refresh_token":"eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lk",
    "refresh_expires_in":3600,
    "token_type":"Bearer",
    "not-before-policy":0,
    "session_state":"3d5ee6c7-d2e1-48f6-8fff-9164a179175a",
    "scope":"email profile"
}

400 Response

Error in the Access Token Request
Body ()
Root Schema : AccessTokenErr
Type: object
Error returned in the access token response message
Show Source

401 Response

Error in the Access Token Request
Body ()
Root Schema : AccessTokenErr
Type: object
Error returned in the access token response message
Show Source

405 Response

Method Not Allowed
Body ()
Root Schema : AccessTokenErr
Type: object
Error returned in the access token response message
Show Source

500 Response

Internal Server Error
Body ()
Root Schema : AccessTokenErr
Type: object
Error returned in the access token response message
Show Source

503 Response

Service unavailable
Body ()
Root Schema : AccessTokenErr
Type: object
Error returned in the access token response message
Show Source

Default Response

Generic Error
Back to Top