Skip to main content

Authentication API

The Authentication API allows you to securely access your application's resources. To perform authentication, you need to provide an API key and a secret.

Login Endpoint

Badge https://sandbox.tickpay.com/api/v1/auth/login

Request

Use the following cURL command to authenticate and obtain an access token:

curl -X 'POST' \
'https://sandbox.tickpay.com/api/v1/auth/login' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"apiKey": "your_key",
"apiSecret": "your_secret"
}'

Request body

ParameterDescriptionRequired
apiKeyAPI key for authentication.true
apiSecretAPI secret for authentication.true

Response

The response will contain a data object with an accessToken property, along with additional information:

{
"data": {
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjUzY2RmMmQxLWE0M2YtNDFiMi05M2VhLTE0NmE2ODVjOGZlOSIsInJvbGUiOiJjbGllbnQiLCJpYXQiOjE3MDQ2Nzk5NjcsImV4cCI6MTcwNDY4MzU2N30.NahxV_-CFt86SpnNvXyEdrdpNkn6TGC4UJdlG2ZRNDE"
},
"messageError": null,
"success": true
}

Response Properties

ParameterDescriptionDefault Value
dataObject containing response data.null
accessTokenThe generated access token.null
messageErrorError message.null
successIndicates whether the request was successful.false