Get the Client Secret of an OAuth2 Client
Headers
Authorization: OAuth the-session-uuidCurl Example
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/oauth2/clients/d734cef1f11137e3954f73fc337474ab/client-secretParameters
| Name | Type | Location | Description | Valid Values | Since |
|---|---|---|---|---|---|
| uuid | String | url | OAuth2 client UUID | 5.0.0 | |
| systemTags (optional) | List | query | System tags | 5.0.0 | |
| userTags (optional) | List | query | User tags | 5.0.0 |
API Response
Response Example
{
"clientSecret": "exampleClientSecret"
}| Name | Type | Description | Since |
|---|---|---|---|
| success | boolean | Whether the get operation succeeded | 5.0.0 |
| clientSecret | String | Client Secret of the OAuth2 client | 5.0.0 |
| error | ErrorCode | Error code. If this field is not null, the operation failed. If the operation succeeds, this field is null. For details, see error | 5.0.0 |
error
| Name | Type | Description | Since |
|---|---|---|---|
| code | String | Error code, a globally unique identifier of the error, for example, SYS.1000 or HOST.1001 | 0.6 |
| description | String | Brief description of the error | 0.6 |
| details | String | Detailed information about the error | 0.6 |
| elaboration | String | Reserved field. The default value is null | 0.6 |
| opaque | LinkedHashMap | Reserved field. The default value is null | 0.6 |
| cause | ErrorCode | Root error, which is the source error that caused the current error. If there is no source error, this field is null | 0.6 |
SDK Example
Java SDK
GetOAuthClientSecretAction action = new GetOAuthClientSecretAction();
action.uuid = "d734cef1f11137e3954f73fc337474ab";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetOAuthClientSecretAction.Result res = action.call();Python SDK
action = GetOAuthClientSecretAction()
action.uuid = "d734cef1f11137e3954f73fc337474ab"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()