Registering a Client
Function
This API is used to register a client in IAM Identity Center, which allows the client to initiate device authorization. The output should be persistent for reuse by authentication requests.
URI
POST /v1/clients
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| client_name | Yes | String | Client name Minimum length: 1 Maximum length: 1024 |
| client_type | Yes | String | Client type. Only the public client is supported. Enumerated value:
|
| token_endpoint_auth_method | Yes | String | Authentication method required to send a request to the token endpoint Enumerated value:
|
| scopes | No | Array of strings | List of scopes defined by a client to restrict permissions for access token authorization |
| grant_types | Yes | Array of strings | OAuth2.0 authorization type that a client can use at the token endpoint Enumerated value:
|
| response_types | Yes | Array of strings | OAuth2.0 authorization type that a client can use at the authorization endpoint Enumerated value:
|
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| Object | Client registration information |
| Parameter | Type | Description |
|---|---|---|
| authorization_endpoint | String | Authorization endpoint requested from a client |
| client_id | String | Unique ID of a client application |
| client_id_issued_at | Long | Registration time of the client ID and secret key |
| client_secret | String | Secret string generated for the client to obtain authorization from services in subsequent calls |
| client_secret_expires_at | Long | Expiration time of the client ID and secret key |
| token_endpoint | String | Endpoint from which a client can obtain an access token |
| scopes | Array of strings | List of registered scopes for subsequent authorization of access tokens for a client |
Example Request
Registering a client in IAM Identity Center
POST https://{hostname}/v1/clients
{
"client_name" : "exampleClient",
"client_type" : "public",
"token_endpoint_auth_method" : "client_secret_post",
"scopes" : [ "openid" ],
"grant_types" : [ "authorization_code", "urn:ietf:params:oauth:grant-type:device_code"],
"response_types" : [ "code" ]
} Example Response
Status code: 200
Successful
{
"client_info" : {
"authorization_endpoint" : "https://example-region-oidc.examplehh.com:443/v1/authorize",
"client_id" : "example_client_id",
"client_id_issued_at" : 1677175760,
"client_secret" : "example_client_secret",
"client_secret_expires_at" : 1684951760,
"token_endpoint" : "https://example-region-oidc.examplehh.com:443/v1/tokens",
"scopes" : [ "openid" ]
}
} Status Codes
For details, see Status Codes.
Error Codes
For details, see Error Codes.