İçeriğe geç

Geliştirici Anahtarını Güncelle

PUT /v1/tokens/{USER_ID}/676728ed9ee96576437e8f97
PUT /v1/tokens/{USER_ID}/676728ed9ee96576437e8f97

Kullanıcıya özel oluşturulan API anahtarının geçerlilik durumunu veya IP kısıtlamalarını günceller.

ParametreKonumTipAçıklamaVarsayılanÖrnek
Authorization * headerstringBearer Yetkilendirme Tokeni (Örn: Bearer eyJhb...)-Bearer <TOKEN>
USER_ID * pathstringİşlem yapan kullanıcının kimlik (ID) değeri. UUID formatındadır.--
{
"types":[
"access_token"
],
"title":"accessToken",
//"expire":"10", // => not yet ready
"active":true,
"blocked":false // => for admin role
//"others":{
// => get others
//}
}
fetch('https://api.kargomucuz.com/v1/tokens/{USER_ID}/676728ed9ee96576437e8f97', {
method: 'PUT',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer <YOUR_TOKEN>'
},
body: JSON.stringify({
"types":[
"access_token"
],
"title":"accessToken",
//"expire":"10", // => not yet ready
"active":true,
"blocked":false // => for admin role
//"others":{
// => get others
//}
})
})
.then(response => response.json())
.then(data => console.log(data));
500: Sunucu Hatası
{
"error": "fetch failed"
}
504: Gateway Timeout