DevCraft Документации
РазработкиAPI WrappersWebShare Proxy PHP WrapperGuides

Auth и токены v1.0.0

Profile, IpAuthorization, ApiKey, DownloadToken, Notification.

Аккаунт, allowlist IP, API keys, download-токены и уведомления.

Profile

$profile = App::Requests('Profile')->retrieve();
$prefs = App::Requests('Profile')->retrievePreferences();

См. ProfileRequest. Preferences — не путать с ProxyConfig (plan-level).

IpAuthorization

Allowlisted source IP для доступа к прокси без username/password.

$ips = App::Requests('IpAuthorization');
$ips->create('203.0.113.10');
$me = $ips->whatsMyIp();

См. IpAuthorizationRequest.

ApiKey

$keys = App::Requests('ApiKey');
$key = $keys->create('ci-bot');
$keys->delete($key->id);

См. ApiKeyRequest. Не путать с DownloadToken.

DownloadToken

Time-limited ключ для скачивания proxy list / replaced / activity.

$token = App::Requests('DownloadToken')->get('proxy_list');
App::Requests('DownloadToken')->reset('proxy_list');

См. DownloadTokenRequest.

Notification

$n = App::Requests('Notification');
$list = $n->list();
$n->dismiss($id);
$n->restore($id);

См. NotificationRequest.

На этой странице