Authentication
API erişimi için kimlik doğrulama yöntemleri.
POST
/api/v1/auth/token
Token Oluştur
API key ve secret ile Bearer token oluşturur. Token 24 saat geçerlidir.
Parametreler
| Parametre | Tip | Zorunlu | Açıklama |
|---|---|---|---|
api_key |
string | Zorunlu | API anahtarınız |
api_secret |
string | Zorunlu | API gizli anahtarınız |
Request Body
{
"api_key": "pk_live_xxx",
"api_secret": "sk_live_xxx"
}
Response
200
{
"success": true,
"data": {
"token": "eyJ0eXAiOiJKV1QiLCJ...",
"expires_at": "2026-02-23T14:30:00Z",
"token_type": "Bearer"
}
}
POST
/api/v1/auth/revoke
Token İptal Et
Mevcut Bearer token'ı iptal eder.
Kimlik doğrulama gerektirir
Response
200
{
"success": true,
"message": "Token başarıyla iptal edildi."
}
cURL Örneği
POST /api/v1/auth/token
curl -X POST https://api.pratikesnaf.com/api/v1/auth/token \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"api_key": "pk_live_xxx", "api_secret": "sk_live_xxx"}'