Skip to main content
Version: 2019-05-29 (Current)

List Chain Keys

List API keys for a chain connection. Returns a paginated list of keys associated with the sub-merchant account, which can be used for authentication when performing operations on their behalf.

Request Parametersโ€‹

Required - 1 fieldPath Parameters
โ–ผ
`id`STRING(required)
Chain identifier matching pattern /acch(_test)?_[0-9a-z]+/. This is provided in the URL path.
Example:"acch_test_5xuy4w91xqz7d1w9u0t"
Constraints:Must be a valid chain ID
Additional - 5 fieldsQuery Parameters

Responsesโ€‹

200

Successful retrieval

Keys list retrieved successfully. Returns a paginated list with metadata.

Response structure:
  • object - Always returns "list"
  • data - Array of key objects
  • limit - Records per page
  • offset - Number of records skipped
  • total - Total number of keys matching filters

400

Bad request

Request validation failed. Check the error message for details.

Common causes:
  • Invalid chain ID format
  • Invalid date format for from/to parameters
  • Invalid pagination parameters

401

Unauthorized

Authentication failed. Invalid or missing API key.

Common causes:
  • Missing Authorization header
  • Invalid secret key
  • Using public key instead of secret key
  • Incorrect HTTP Basic Auth format

404

Not found

Chain not found with the provided ID.

Common causes:
  • Invalid chain ID format
  • Chain does not exist
  • Chain belongs to different account
  • Using test key with live chain ID (or vice versa)

5xx

Server error

Server-side error occurred. These are rare but should be handled gracefully.

How to handle:

Code samplesโ€‹

curl https://api.omise.co/chains/acch_test_5xuy4w91xqz7d1w9u0t/keys \
-u skey_test_5xuy4w91xqz7d1w9u0t: \
-G \
-d "limit=20" \
-d "offset=0"

Error and result codesโ€‹

Common Error Codesโ€‹

CodeDescriptionResolution
bad_requestMissing or invalid parametersCheck parameter values and formats
authentication_failureInvalid API keyVerify your secret key is correct
not_foundChain not foundCheck chain ID is correct and exists
invalid_date_formatDate format validation failedUse ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ)

Key Object Fieldsโ€‹

FieldTypeDescription
objectstringAlways returns "key"
idstringUnique key identifier
livemodebooleanProduction vs test environment indicator
secretbooleanWhether this is a secret key
created_atstringKey creation timestamp (ISO 8601)

๐Ÿ”‘API Credentials

Try it outโ€‹

Additional - 5 fields
Your IP: ...Loading...