Query API Code Status

Query the API code info of a certain wallet.

Use the inactivated API code in any request will activate it. Once activated, the currently activated API code will immediately become invalid.

Request

GET /v1/sofa/wallets/{WALLET_ID}/apisecret

Response Body

Field Type Description
valid object Activated API code
inactivated object Not active API code
api_code string API code for querying wallet
exp int64 API code expiration unix time in UTC

Sample Request

API

/v1/sofa/wallets/56788/apisecret

Response Body

{
  "valid": {
    "api_code": "H4Q6xFZgiTZb37GN",
    "exp": 1583144863
  },
  "inactivated": {
    "api_code": "32PmGCjNzXda4mNHX"
  }
}

Sample cURL Command

curl -X GET http://localhost:8889/v1/mock/wallets/{WALLET_ID}/apisecret