Generate a secret
POST /v3/auth
Optional: See the Authentication guide for more information.
- application/json
Request Body
lifetime object
Define how long this secret should be valid for.
unit stringPossible values: [
second
,minute
,hour
,day
]Default value:
hour
count integerDefault value:
24
scopes object
sessionId stringOptional: Scope this secret to only be valid for a specific session.
tokenId stringOptional: Scope this secret to only be valid for a specific tokenized payment method.
operations string[]Possible values: [
create_session
,read_session
,update_session
,update_session_metadata
,capture_order
,refund_order
,cancel_order
,validate_session
,update_cart
,update_references
,create_hpp
,read_token
,patch_token
,delete_token
]Optional: Define which operations this secret can be used for.
- 201
- 400
- 403
- application/json
- Schema
- Example (from schema)
Schema
- secret string
- expiresAt string
{
"secret": "string",
"expiresAt": "2023-04-12T13:16:08.647Z"
}
- application/json
- Schema
- Example (from schema)
Schema
error object
code stringPossible values: [
INVALID_DATA
,UNKNOWN
]message string
{
"error": {
"code": "INVALID_DATA",
"message": "string"
}
}
- application/json
- Schema
- Example (from schema)
Schema
error object
code stringPossible values: [
INVALID_CREDENTIALS
,INVALID_API_KEY
,AUTH_SECRET_EXPIRED
]message string
{
"error": {
"code": "INVALID_CREDENTIALS",
"message": "string"
}
}