Giriş yap
POST
/api/website/customers/login
const url = 'https://api.petanqueai.com/api/website/customers/login';const options = { method: 'POST', headers: { 'x-storefront-token': '<x-storefront-token>', 'Content-Type': 'application/json' }, body: '{"email":"hello@example.com","password":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.petanqueai.com/api/website/customers/login \ --header 'Content-Type: application/json' \ --header 'x-storefront-token: <x-storefront-token>' \ --data '{ "email": "hello@example.com", "password": "example" }'E-posta ve şifreyi kontrol eder ve 30 gün geçerli bir oturum token’ı ile expiresAt döndürür. Token’ı Giriş yapmış müşteri uç noktalarında x-customer-session başlığında gönderin. Yalnızca yanıt gövdesinde döner; çerez ayarlanmaz.
Sebebi ne olursa olsun her başarısızlık aynı 401’i alır. Adres başına 15 dakikada 10 denemeyle sınırlıdır.
Yetkilendirmeler
Bölüm başlığı “Authorizations”İstek gövdesizorunlu
Bölüm başlığı “Request Bodyrequired”object
email
zorunlu
string biçim: email
password
zorunlu
string
Example generated
{ "email": "hello@example.com", "password": "example"}object
email
zorunlu
string biçim: email
password
zorunlu
string
Example generated
email=hello%40example.com&password=exampleobject
email
zorunlu
string biçim: email
password
zorunlu
string