API: STS API
API | Token Server |
---|---|
STS API | https://idsuat.walletgate.io/connect/token |
Token isteği (scope, client ve secret parametreleri belirlenecek ve karşı tarafla paylaşılacak):
curl --location --request POST 'https://idsuat.walletgate.io/connect/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'scope=sts_api' \
--data-urlencode 'client_id= xxx' \
--data-urlencode 'client_secret= xxx’
client_id : client_id müşteriye atanan benzersiz bir anahtardır.
örnek :
A55F7C33-245E-4D53-9639-D70347BC7DB0
client_secret : client_secret üye işyerine verilen benzersiz ve gizli bir anahtardır.
örnek :
bv2CEAm7L9H5a3UB
Örnek Başarılı Cevap:
{"access_token":"eyJhbGciOiJSUzI1NiIsImtpZCI6IkE4RkY5MEQxN0U5NjI1M0JCNj
E1QzU2REU3QzhFNEMwIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2MTczNDk4NzEsImV4c
CI6MTYxNzM1MzQ3MSwiaXNzIjoiaHR0cHM6Ly9sb2NhbGhvc3Q6NTAwMSIsImNsaWVudF9pZ
CI6ImNsaWVudCIsImp0aSI6IkNDRkZEM0VERTU3NjVGRUZFNEQyQTE2RjFGNDBGQTBDIiwia
WF0IjoxNjE3MzQ5ODcxLCJzY29wZSI6WyJhcGkxIl19.S5l3NZczGnTQ00-tm3A2kxePH3-L
6tWuah1ew6AiKegu3XqYwo7gsjgaIrdWPGJ62vuwfrGMg5iJzLHwYZtjX6CZek8gNbGIe4M
ohP3ECP0xphNpUbChtVanQnpi9xOwKWgf5xjigq9Z1PxmFydtdxuqPGtLscfsO7IpaKZ6jywB
hBnvMozAev3ke0chtyfcP_t5NhC2hi4XzI6-xh7JGNo_w2KnCHb6HmeU2Hcj5cT6hzsnSOPVN
P-yGdonzUawlTXd49AaHFiaKHSf-qFJXeWZ9cnXzjJu1xBnLVBsyscj4P-s6WybDE2-ob8dpD
4XzO58MZV7LrDQfZVYdahAg","expires_in":3600,"token_type":"Bearer","scope":"sts_api"}
Örnek Başarısız Cevap (scope, secret vs. yanlış girilmişse):
{
"error":"invalid_client"
}