Bearer Token Alımı
Prod URL: https://api.hepsipay.com/oauth/token
Test URL: https://apientgr.hepsipay.com/oauth/token
HTTP Method: POST
Header value: Content-Type: application/x-www-form-urlencoded; Authorization = Basic Base64(ClientId+:+ClientSecret)
Body: grant_type = password
Örnek kod:
POST /oauth/token HTTP/1.1
Host: apientgr.hepsipay.com
Authorization: Basic ZXlKMGVYQWlPaUpLVjFRaUxDSmhiR2NpT2lKSVV6STFOaUo5LmV5SnliMnhsSWpveExDSmhjR2xMWlhraU9pSmtPREl4T0RFNE9ERmtaR0kwTjJJM1ltUmhNMk5tTlRObU1UWmlNVFExWkNKOS5UTmJhUnQ3dGxzcnowaTgtUVNwemFiTWNGSjhaSUlIYXV2S24yRE01dkxNOmEwMmE2NTU2
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache
Postman-Token: 1c213f0e-7b13-8080-8d2b-ca421da73cb0
grant_type=password
NOT!
Diğer tüm alanlar bir key value pair list oluşturularak, HttpClient’a HttpContent olarak eklenerek gönderilir.