Get settings
/user/settingsRetrieve all user settings, for example: name, email, currency.
Ta metoda wymaga autoryzacji!
Możesz skorzystać z własnego klucza API, który znajdziesz pod adresem {panel sterowania.
Ta metoda - wymaga uprawnień -user-settings.read
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/user/settings
Parametry zapytania
| Identyfikator | Regulamin | Przykład |
|---|---|---|
| password-confirmationNie koniecznie | required_with:passwordsame:password | "RYwSU8d3" |
Przykłady kodu
1const baseUrl = "https://api.stableproxy.com/v2";2const response = await fetch(baseUrl + "/user/settings", {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": {
"settings": [
{
"id": "name",
"name": "name",
"description": "",
"placeholder": "",
"validationRules": [
"nullable",
"string",
"min:1",
"max:52"
],
"value": "Fudo Tsukiko"
},
{
"id": "email",
"name": "email",
"description": "",
"placeholder": "",
"validationRules": [
"nullable",
"string",
"email",
"max:80",
"unique:users,email"
],
"value": "[email protected]"
}
]
},
"good": true,
"timestamp": 1700559670,
"cause": {
"type": "user",
"user_id": 1,
"token_id": 50,
"token_sign": "397eb5db79e5cd4c591ada973f57379c"
}
}