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

Retrieve consent

Retrieve consent information for the account. This endpoint returns the current consent status and configuration details for the authenticated account.


Request Parametersโ€‹

No parameters required for this endpoint.


Responsesโ€‹

200

Successful request

Returns the consent object with status and configuration details.

Consent object contains:
  • object - String value "consent"
  • id - Consent identifier
  • location - API endpoint path "/consent"
  • consented - Boolean indicating if consent has been given
  • consented_at - Timestamp when consent was given (ISO 8601)
  • created_at - Consent record creation timestamp (ISO 8601)

400

Bad request

Request validation failed. Check the error message for details.

Common causes:
  • Invalid request format
  • Malformed request headers

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

Consent record not found for the account.

Common causes:
  • Consent has not been configured for the account
  • Account does not have consent requirements

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/consent \
-u skey_test_5xuy4w91xqz7d1w9u0t:

๐Ÿ”‘API Credentials

Try it outโ€‹

Your IP: ...Loading...