Discussions

Ask a Question
Back to All

Invalid Key Scope error

curl --request POST
--url https://pg-sandbox.paymaya.com/payby/v2/paymaya/payments
--header 'Accept: application/json'
--header 'Authorization: Basic cGstbE5BVWsxams3VlBuZjdrb09UMXVvR0pvWkpqbUF4cmJqcGo2dXJCOEVJQTo='
--header 'Content-Type: application/json'
--data '
{
"totalAmount": {
"value": 111,
"currency": "PHP"
},
"redirectUrl": {
"success": "1.com",
"failure": "22.com",
"cancel": "3.com"
},
"requestReferenceNumber": "12412451351"
}
'

why when i test this using sandbox key it always throw error :
{"error":"Invalid key scope. Please check the provided key's scopes.","code":"K007","reference":"db198b36-1cc2-465d-9ff2-218730509740"}

is there something wrong with my request? Thanks