Get the Client Secret of an OAuth2 Client

GET/zstack/v1/oauth2/clients/{uuid}/client-secret

Headers

Authorization: OAuth the-session-uuid

Curl 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-secret

Parameters

NameTypeLocationDescriptionValid ValuesSince
uuidStringurlOAuth2 client UUID 5.0.0
systemTags (optional)ListquerySystem tags 5.0.0
userTags (optional)ListqueryUser tags 5.0.0

API Response

Response Example

{
  "clientSecret": "exampleClientSecret"
}
NameTypeDescriptionSince
successbooleanWhether the get operation succeeded5.0.0
clientSecretStringClient Secret of the OAuth2 client5.0.0
errorErrorCodeError code. If this field is not null, the operation failed. If the operation succeeds, this field is null. For details, see error5.0.0

error

NameTypeDescriptionSince
codeStringError code, a globally unique identifier of the error, for example, SYS.1000 or HOST.10010.6
descriptionStringBrief description of the error0.6
detailsStringDetailed information about the error0.6
elaborationStringReserved field. The default value is null0.6
opaqueLinkedHashMapReserved field. The default value is null0.6
causeErrorCodeRoot error, which is the source error that caused the current error. If there is no source error, this field is null0.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()