Oauth Return list of allowed targets (which can be used in oauth).
A list of all publicly available methods for interacting with the API.
POST
Retrieve auth url Oauth ### OAuth start request This request is giving url for oauth authorization, then it will redirect to redirect url with oauth-uid and oauth-signature #### Target Auth URL This is url where user complete oauth authorization (our endpoint). #### Where get API Application? You need contact us in [support](/support) and we will give you API Application -/user/oauth/contest
Query method
POSThttp://apilocal.stableproxy.com/v2/user/oauth/contest
Query parameters
| Identifier | Regulations | Example |
|---|---|---|
| public-key | requiredstring | 206 |
| target-auth-url | requiredstringurl | 271 |
| abilities | requiredarray | 16 |
| redirect-url | requiredurl | 134 |
| abilities.* | requiredstringin:sessions.read, sessions.delete, api-tokens.read, api-tokens.create, api-tokens.delete, balance.history, balance.subscriptions, balance.un-subscribe, balance.read, features.read, features.update, support.read, support.create, conversation.read, conversation.create, promo.read, promo.activate, phone.link, phone.read, user-settings.update, user-settings.read, user.resend-email, packages-settings.update, packages-settings.read, packages-features.update, packages-features.read, packages-statistics.read, packages-diffs.list, packages-diffs.read, packages-proxies.read, packages-proxies.update, packages-orders.update, cart.purchase, user.read, notifications.read, referral.read, referral.create, referral.delete, referral.update, referral.by, packages.read, packages.update, packages.proxies, packages.set-proxies, packages.change-proxy-ip, packages.set-note, packages.set-super-proxy, packages.reset-download-hash, packages.delete, topup.methods, topup.uploaddistinct | "sessions.read" |
Code examples
JavaScript
async function postUserOauthContest() {
const baseUrl = 'http://apilocal.stableproxy.com/v2';
const req = await fetch(baseUrl + '/user/oauth/contest', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
"public-key": 206,
"target-auth-url": 271,
"abilities": 16,
"redirect-url": 134,
"abilities.*": "sessions.read"
}),
}
);
const res = await req.json();
}Examples of answers
Success response
GET
Get app info Oauth Return information oauth provider and API application -/user/oauth/info
Query method
GEThttp://apilocal.stableproxy.com/v2/user/oauth/info
Query parameters
| Identifier | Regulations | Example |
|---|---|---|
| uid | requiredstring | 91 |
Code examples
JavaScript
async function getUserOauthInfo() {
const baseUrl = 'http://apilocal.stableproxy.com/v2';
const req = await fetch(baseUrl + '/user/oauth/info?' + Object.entries({
"uid": 91
}).map(([key, value]) => key + "=" + value).join('&'), {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}
);
const res = await req.json();
}Examples of answers
Success response
GET
Get allowed targets Oauth -/user/oauth/targets
Query method
GEThttp://apilocal.stableproxy.com/v2/user/oauth/targets
Code examples
JavaScript
async function getUserOauthTargets() {
const baseUrl = 'http://apilocal.stableproxy.com/v2';
const req = await fetch(baseUrl + '/user/oauth/targets', {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}
);
const res = await req.json();
}