Updated on 2022-02-21 GMT+08:00

Resetting an AppSecret

Function

This API is used to reset the secret of a specified app.

URI

The following table lists the HTTP/HTTPS request method and URI of the API.

Table 1 HTTP/HTTPS request method and URI

Request Method

URI

PUT

/v1.0/apigw/apps/secret/{id}

The following table lists the parameter in the URI.

Table 2 Parameter description

Parameter

Mandatory

Type

Description

id

Yes

String

App ID, which can be obtained by querying the app list

Request

Table 3 Parameter description

Parameter

Mandatory

Type

Description

app_secret

No

String

AppSecret

An AppSecret consists of 8–64 characters, starting with a letter or digit. Only letters, digits, and the following special characters are allowed: _-!@#$%

NOTE:

This parameter is available in some regions.

Example request:

{
        "app_secret": "app_secret_sample"
}

Response

Table 4 Parameter description

Parameter

Type

Description

id

String

App ID

name

String

App name

status

Integer

App status

app_key

String

AppKey

app_secret

String

AppSecret

creator

String

App creator, which can be:

  • USER: The app is created by the API user.
  • MARKET: The app is allocated by the marketplace.

register_time

Timestamp

Time when the app is registered

remark

String

Description of the app

update_time

Timestamp

Time when the app was last updated

Example response:

{
	"id": "14b399ac-967f-4115-bb62-c0346b4537e9",
	"name": "app_001",
	"status": 1,
	"app_key": "d49b1cbf-cc81-4a5f-b2a0-61b568e376eb",
	"app_secret": "******",
	"creator": "USER",
	"remark": "First app",
	"register_time": "2017-12-28T12:26:54Z",
	"update_time": "2017-12-28T12:29:35.571Z"
}

Status Codes

Table 5 Status codes

Status Code

Description

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Server Internal Error