Kimlik Doğrulama Genel bakış
Kullanıcı Girişi
POST
/v1/auth/sign-in Detaylı Açıklama
Section titled “Detaylı Açıklama” POST
/v1/auth/sign-in E-posta veya kullanıcı adı ile parola doğrulayarak sisteme entegrasyon erişimi / JWT sağlar.
İstek Gövdesi
Section titled “İstek Gövdesi”{ "email":"", "username":"example", "password":"example"}Örnek Kod
Section titled “Örnek Kod”fetch('https://api.kargomucuz.com/v1/auth/sign-in', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer <YOUR_TOKEN>' }, body: JSON.stringify({ "email":"", "username":"example", "password":"example" })}).then(response => response.json()).then(data => console.log(data));$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.kargomucuz.com/v1/auth/sign-in');curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
$body = <<<'EOD'{ "email":"", "username":"example", "password":"example"}EOD;curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
$headers = array();$headers[] = 'Content-Type: application/json';$headers[] = 'Authorization: Bearer <YOUR_TOKEN>';curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);if (curl_errno($ch)) { echo 'Error:' . curl_error($ch);}curl_close($ch);echo $result;Yanıtlar
Section titled “Yanıtlar”200: Başarılı
{ "status": false, "message": "Kullanıcı bulunamadı.", "code": 500}