Get Proxy Rotate Token
/package/rotate-token/{id}Get (or create) the rotate-only API token for building a shareable rotate link.
Call this immediately before copying a proxy-rotate link. The same name
always resolves to the same token, so copying a link twice never invalidates
the first one. The token carries a single ability, packages.change-proxy-ip.
Ta metoda wymaga autoryzacji!
Możesz skorzystać z własnego klucza API, który znajdziesz pod adresem {panel sterowania.
Ta metoda - wymaga uprawnień -api-tokens.create
Tworząc token API w swoim panelu sterowania, możesz wybrać określone uprawnienia (np. uniemożliwić tokenowi składanie zamówień).
Listę uprawnień znajdziesz także w naszej dokumentacji.
Listę uprawnień znajdziesz także w naszej dokumentacji.
Metoda zapytania
GEThttps://api.stableproxy.com/v2/package/rotate-token/{id}
Parametry zapytania
| Identyfikator | Regulamin | Przykład |
|---|---|---|
| nameNie koniecznie | nullablestringregex:/^[\w \-]+$/u | 44 |
| id | 1required | 32 |
Przykłady kodu
1const baseUrl = "https://api.stableproxy.com/v2";2const response = await fetch(baseUrl + "/package/rotate-token/{id}", {3 method: "GET",4 headers: {5 "Authorization": "API-Token [YOUR TOKEN]",6 "Content-Type": "application/json"7 }8});9const data = await response.json();Przykłady odpowiedzi
Success response200application/json
{
"data": {
"created": false,
"name": "rotate",
"token": "123|4c8b2f1e-...",
"abilities": [
"packages.change-proxy-ip"
],
"expires_at": null,
"rotate_url_template": "https://api.stableproxy.com/v2/package/proxy-rotate/42/{proxyIndex}"
},
"good": true
}