[{"data":1,"prerenderedAt":602},["ShallowReactive",2],{"openapi-specs-catalog":3,"openapi-nav-en-Onlinesim-API-UN":38,"openapi-doc-\u002FOnlinesim-API-UN\u002FOnlinesim-API-UN-post-api-profile-php":173,"openapi-op-\u002FOnlinesim-API-UN\u002FOnlinesim-API-UN-post-api-profile-php":571},["Reactive",4],{"defaultLocale":5,"base":6,"specs":7,"specsMeta":11,"locales":35},"en","\u002Fopenapi_docs\u002F",[8,9,10],"Onlinesim-API-UN","Reseller-API-UN","Alternative-API-UN",[12,22,29],{"name":8,"fileName":8,"title":13,"version":14,"description":15,"basePath":16,"specsPath":17,"locales":18,"defaultLocale":5},"Onlinesim API","1.1","This API will allow you to access all services provided by Onlinesim: SMS receiving from a single specific service on a virtual number; rent a number ","Onlinesim-API-UN\u002F","\u002Fopenapi_docs\u002Fspecs\u002FOnlinesim-API-UN",{"en":19,"ru":20,"de":21},"English","Русский","Deutsch",{"name":9,"fileName":9,"title":23,"version":24,"description":25,"basePath":26,"specsPath":27,"locales":28,"defaultLocale":5},"Reseller API","1.0","The API is intended for current and potential Onlinesim partners. It allows you to monetize your numbers by providing them to our customers for receiv","Reseller-API-UN\u002F","\u002Fopenapi_docs\u002Fspecs\u002FReseller-API-UN",{"en":19,"ru":20,"de":21},{"name":10,"fileName":10,"title":30,"version":24,"description":31,"basePath":32,"specsPath":33,"locales":34,"defaultLocale":5},"Alternative API","Alternative API is compatible with the sms-activate protocol: programs written for it work with Onlinesim after changing the address to https:\u002F\u002Fonline","Alternative-API-UN\u002F","\u002Fopenapi_docs\u002Fspecs\u002FAlternative-API-UN",{"en":19,"ru":20,"de":21},[5,36,37],"ru","de",[39,43,48,53,86,125,134,163],{"text":13,"link":40,"icon":41,"description":42},"\u002FOnlinesim-API-UN\u002Finfo","icons\u002Fdocs\u002Finfo","API overview and introduction",{"text":44,"link":45,"icon":46,"description":47},"Authorization","\u002FOnlinesim-API-UN\u002Fauth","icons\u002Fdocs\u002Fauth","API keys, OAuth, and security schemes",{"text":49,"link":50,"icon":51,"description":52},"Components","\u002FOnlinesim-API-UN\u002Fcomponents","icons\u002Fdocs\u002Fcomponents","Shared query parameters",{"text":54,"collapsed":55,"items":56,"description":84,"icon":85},"profile",false,[57,63,68,74,79],{"text":58,"link":59,"method":60,"path":61,"description":62,"deprecated":55},"getBalance","\u002FOnlinesim-API-UN\u002FOnlinesim-API-UN-get-api-getbalance-php","GET","\u002Fapi\u002FgetBalance.php","Get the balance of the profile",{"text":64,"link":65,"method":60,"path":66,"description":67,"deprecated":55},"getProfile","\u002FOnlinesim-API-UN\u002FOnlinesim-API-UN-get-api-getprofile-php","\u002Fapi\u002FgetProfile.php","Get the profile",{"text":69,"link":70,"method":71,"path":72,"description":73,"deprecated":55},"setProfile","\u002FOnlinesim-API-UN\u002FOnlinesim-API-UN-post-api-profile-php","POST","\u002Fapi\u002Fprofile.php","Update the profile (webhook URL and defaults)",{"text":75,"link":76,"method":60,"path":77,"description":78,"deprecated":55},"getPaymentHistory","\u002FOnlinesim-API-UN\u002FOnlinesim-API-UN-get-api-getpaymenthistory-php","\u002Fapi\u002FgetPaymentHistory.php","Get the top-up history",{"text":80,"link":81,"method":60,"path":82,"description":83,"deprecated":55},"getWebhookLogs","\u002FOnlinesim-API-UN\u002FOnlinesim-API-UN-get-api-webhook-logs","\u002Fapi\u002Fwebhook-logs","Get the webhook delivery log","allows to access profile-related API requests","icons\u002Fdocs\u002Ffolder",{"text":87,"collapsed":55,"items":88,"description":124,"icon":85},"single-service activations",[89,94,99,104,109,114,119],{"text":90,"link":91,"method":60,"path":92,"description":93,"deprecated":55},"setOperationRevise","\u002FOnlinesim-API-UN\u002FOnlinesim-API-UN-get-api-setoperationrevise-php","\u002Fapi\u002FsetOperationRevise.php","Move to the next received SMS of an operation",{"text":95,"link":96,"method":60,"path":97,"description":98,"deprecated":55},"getTariffs","\u002FOnlinesim-API-UN\u002FOnlinesim-API-UN-get-api-gettariffs-php","\u002Fapi\u002FgetTariffs.php","Tariffs for single-service activations",{"text":100,"link":101,"method":60,"path":102,"description":103,"deprecated":55},"getNumbersStats","\u002FOnlinesim-API-UN\u002FOnlinesim-API-UN-get-api-getnumbersstats-php","\u002Fapi\u002FgetNumbersStats.php","Countries with services, prices and stock",{"text":105,"link":106,"method":60,"path":107,"description":108,"deprecated":55},"getPrice","\u002FOnlinesim-API-UN\u002FOnlinesim-API-UN-get-api-getprice-php","\u002Fapi\u002FgetPrice.php","Price of a number for a service",{"text":110,"link":111,"method":60,"path":112,"description":113,"deprecated":55},"getNum","\u002FOnlinesim-API-UN\u002FOnlinesim-API-UN-get-api-getnum-php","\u002Fapi\u002FgetNum.php","Buy a virtual number for a selected service",{"text":115,"link":116,"method":60,"path":117,"description":118,"deprecated":55},"getState","\u002FOnlinesim-API-UN\u002FOnlinesim-API-UN-get-api-getstate-php","\u002Fapi\u002FgetState.php","Get information on numbers with active operations",{"text":120,"link":121,"method":60,"path":122,"description":123,"deprecated":55},"setOperationOk","\u002FOnlinesim-API-UN\u002FOnlinesim-API-UN-get-api-setoperationok-php","\u002Fapi\u002FsetOperationOk.php","Complete activation operation","allows to access single-service activations API",{"text":126,"collapsed":55,"items":127,"description":133,"icon":85},"free numbers",[128],{"text":129,"link":130,"method":60,"path":131,"description":132,"deprecated":55},"getFreeList","\u002FOnlinesim-API-UN\u002FOnlinesim-API-UN-get-api-getfreelist","\u002Fapi\u002FgetFreeList","Get list of free numbers","allows to access free numbers API",{"text":135,"collapsed":55,"items":136,"description":162,"icon":85},"rent",[137,142,147,152,157],{"text":138,"link":139,"method":60,"path":140,"description":141,"deprecated":55},"tariffsRent","\u002FOnlinesim-API-UN\u002FOnlinesim-API-UN-get-api-rent-tariffsrent-php","\u002Fapi\u002Frent\u002FtariffsRent.php","Get information on tariffs for rent numbers",{"text":143,"link":144,"method":60,"path":145,"description":146,"deprecated":55},"getRentNum","\u002FOnlinesim-API-UN\u002FOnlinesim-API-UN-get-api-rent-getrentnum-php","\u002Fapi\u002Frent\u002FgetRentNum.php","Buy virtual phone number for rent",{"text":148,"link":149,"method":60,"path":150,"description":151,"deprecated":55},"extendRentState","\u002FOnlinesim-API-UN\u002FOnlinesim-API-UN-get-api-rent-extendrentstate-php","\u002Fapi\u002Frent\u002FextendRentState.php","Extend virtual phone number rent",{"text":153,"link":154,"method":60,"path":155,"description":156,"deprecated":55},"getRentState","\u002FOnlinesim-API-UN\u002FOnlinesim-API-UN-get-api-rent-getrentstate-php","\u002Fapi\u002Frent\u002FgetRentState.php","Get information about the state of virtual phone number rent operation",{"text":158,"link":159,"method":60,"path":160,"description":161,"deprecated":55},"closeRentNum","\u002FOnlinesim-API-UN\u002FOnlinesim-API-UN-get-api-rent-closerentnum-php","\u002Fapi\u002Frent\u002FcloseRentNum.php","Close virtual phone number rent operation","allows to access rent API",{"text":164,"collapsed":55,"items":165,"icon":172},"Webhooks",[166],{"text":167,"link":168,"method":169,"path":170,"description":171,"deprecated":55},"newSmsWebhook","\u002FOnlinesim-API-UN\u002FOnlinesim-API-UN-post-newsms","WEBHOOK","\u002FnewSms","Receive SMS via webhook","icons\u002Fdocs\u002Fwebhook",{"title":73,"kind":174,"locale":5,"specName":8,"path":70,"operationKey":175,"method":176,"codeSamplesUrl":177,"description":73,"operation":178,"auth":418,"sections":446},"operation","Onlinesim-API-UN-post-api-profile-php","post","\u002Fopenapi_docs\u002Fapi\u002Fcode\u002FOnlinesim-API-UN\u002FOnlinesim-API-UN-post-api-profile-php.json",{"tags":179,"summary":180,"x-summary-ru":181,"x-summary-de":182,"description":183,"x-description-ru":184,"x-description-de":185,"operationId":69,"parameters":186,"requestBody":198,"responses":259,"security":411,"x-sidebar-title":69,"x-sidebar-title-ru":69,"x-sidebar-title-de":69},[54],"\u003Cp>Update the profile (webhook URL and defaults)\u003C\u002Fp>","Изменить профиль (webhook URL и значения по умолчанию)","Profil ändern (Webhook-URL und Standardwerte)","\u003Cp>Saves the fields passed in \u003Ccode>profile\u003C\u002Fcode> and returns the updated account. Fields not passed stay as they are. JSON and form data (\u003Ccode>profile[webhook_url]=…\u003C\u002Fcode>) both work.\u003C\u002Fp>\n\u003Caside class=\"my-4 rounded-lg border p-4 text-sm leading-relaxed not-prose border-brand-200 bg-brand-50 text-brand-950 theme-dark:text-gray-800\" role=\"note\">\u003Cdiv class=\"openapi-callout-body [&amp;_p:last-child]:mb-0 [&amp;_p]:mb-2\">\u003Cul>\n  \u003Cli>\u003Ccode>webhook_url\u003C\u002Fcode>: a URL sets it, \u003Ccode>null\u003C\u002Fcode> clears it. A change is also copied to all your existing single-service activations and rent numbers, so open operations send webhooks to the new URL (or stop sending them).\u003C\u002Fli>\n  \u003Cli>\u003Ccode>password\u003C\u002Fcode> needs \u003Ccode>password_confirmation\u003C\u002Fcode> (the same) and \u003Ccode>old_password\u003C\u002Fcode>. A changed password signs out other devices.\u003C\u002Fli>\n  \u003Cli>\u003Ccode>email\u003C\u002Fcode> is saved only when the account has no email yet; an activation letter is sent to it.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003C\u002Fdiv>\u003C\u002Faside>\u003Cp>\u003Ccode>number_region\u003C\u002Fcode> is not used by the service and is always \u003Ccode>null\u003C\u002Fcode>; a passed value is not stored.\u003C\u002Fp>","Сохраняет поля, переданные в `profile`, и возвращает обновлённый аккаунт. Непереданные поля не меняются. Работают и JSON, и данные формы (`profile[webhook_url]=…`).\n\n::: info\n- `webhook_url`: URL устанавливает адрес, `null` очищает его. Изменение также копируется во все Ваши существующие операции приёма SMS и аренды номеров, поэтому открытые операции начинают отправлять вебхуки на новый URL (или перестают их отправлять).\n- Для `password` нужны `password_confirmation` (то же значение) и `old_password`. Смена пароля завершает сеансы на других устройствах.\n- `email` сохраняется, только если у аккаунта ещё нет email; на него отправляется письмо активации.\n:::\n\n`number_region` сервисом не используется и всегда равен `null`; переданное значение не сохраняется.","Speichert die in `profile` übergebenen Felder und gibt das aktualisierte Konto zurück. Nicht übergebene Felder bleiben unverändert. Sowohl JSON als auch Formulardaten (`profile[webhook_url]=…`) funktionieren.\n\n::: info\n- `webhook_url`: eine URL setzt sie, `null` löscht sie. Eine Änderung wird auch in alle Ihre bestehenden Einzeldienst-Aktivierungen und Mietnummern übernommen, sodass offene Vorgänge Webhooks an die neue URL senden (oder keine mehr senden).\n- `password` erfordert `password_confirmation` (gleicher Wert) und `old_password`. Ein geändertes Passwort meldet andere Geräte ab.\n- `email` wird nur gespeichert, wenn das Konto noch keine E-Mail hat; an sie wird eine Aktivierungs-E-Mail gesendet.\n:::\n\n`number_region` wird vom Dienst nicht verwendet und ist immer `null`; ein übergebener Wert wird nicht gespeichert.",[187],{"name":188,"in":189,"description":190,"x-description-ru":191,"x-description-de":192,"required":55,"schema":193},"lang","query","\u003Cp>Language of the texts in the answer (country and service names, status texts): \u003Ccode>fr\u003C\u002Fcode>, \u003Ccode>de\u003C\u002Fcode>, \u003Ccode>ru\u003C\u002Fcode>, \u003Ccode>en\u003C\u002Fcode> or \u003Ccode>zh\u003C\u002Fcode>.\nEvery method accepts it; methods without such texts answer the same in any language. Field names, error codes and\nother fixed values stay in English. Without the parameter: \u003Ccode>ru\u003C\u002Fcode> for getTariffs, getNumbersStats and getFreeList;\notherwise the language of the profile for requests with a key, English for requests without one.\nAn unsupported value falls back to the default language\u003C\u002Fp>","Язык текстов в ответе (названия стран и сервисов, тексты статусов): `fr`, `de`, `ru`, `en` или `zh`. Принимается любым методом; методы без таких текстов отвечают одинаково на любом языке. Названия полей, коды ошибок и другие фиксированные значения остаются на английском. Без параметра: `ru` для getTariffs, getNumbersStats и getFreeList; в остальных — язык профиля для запросов с ключом, английский для запросов без ключа. Неподдерживаемое значение заменяется языком по умолчанию","Sprache der Texte in der Antwort (Länder- und Dienstnamen, Statustexte): `fr`, `de`, `ru`, `en` oder `zh`. Jede Methode akzeptiert ihn; Methoden ohne solche Texte antworten in jeder Sprache gleich. Feldnamen, Fehlercodes und andere feste Werte bleiben auf Englisch. Ohne den Parameter: `ru` für getTariffs, getNumbersStats und getFreeList; sonst die Sprache des Profils bei Anfragen mit Schlüssel, Englisch bei Anfragen ohne. Ein nicht unterstützter Wert wird durch die Standardsprache ersetzt",{"type":194,"enum":195,"example":5},"string",[196,37,36,5,197],"fr","zh",{"required":199,"content":200},true,{"application\u002Fjson":201},{"schema":202},{"required":203,"properties":204,"type":258},[54],{"profile":205},{"description":206,"x-description-ru":207,"x-description-de":208,"properties":209,"type":258},"\u003Cp>Fields to change.\u003C\u002Fp>","Поля для изменения.","Zu ändernde Felder.",{"webhook_url":210,"number_country":218,"number_reject":224,"name":234,"username":238,"email":242,"password":246,"password_confirmation":250,"old_password":254},{"description":211,"x-description-ru":212,"x-description-de":213,"type":214,"format":216,"example":217},"\u003Cp>Webhook URL (any \u003Ccode>scheme:\u002F\u002F…\u003C\u002Fcode> URL); \u003Ccode>null\u003C\u002Fcode> clears it.\u003C\u002Fp>","URL вебхука (любой URL вида `scheme:\u002F\u002F…`); `null` очищает его.","Webhook-URL (jede URL der Form `scheme:\u002F\u002F…`); `null` löscht sie.",[194,215],"null","uri","https:\u002F\u002Fexample.com\u002Fhook",{"description":219,"x-description-ru":220,"x-description-de":221,"type":222,"example":223},"\u003Cp>Default country (dialing code) of getNum and getPrice.\u003C\u002Fp>","Страна по умолчанию (телефонный код) для getNum и getPrice.","Standardland (Vorwahl) für getNum und getPrice.","integer",7,{"description":225,"x-description-ru":226,"x-description-de":227,"oneOf":228},"\u003Cp>Default number prefixes skipped by getNum; the string \u003Ccode>null\u003C\u002Fcode> clears them.\u003C\u002Fp>","Префиксы номеров, которые getNum пропускает по умолчанию; строка `null` очищает список.","Standard-Nummernpräfixe, die getNum überspringt; die Zeichenkette `null` löscht sie.",[229,232],{"type":230,"items":231},"array",{"type":194},{"type":194,"enum":233},[215],{"description":235,"x-description-ru":236,"x-description-de":237,"type":194},"\u003Cp>Up to 255 characters.\u003C\u002Fp>","До 255 символов.","Bis zu 255 Zeichen.",{"description":239,"x-description-ru":240,"x-description-de":241,"type":194},"\u003Cp>Up to 255 characters, unique.\u003C\u002Fp>","До 255 символов, уникальное.","Bis zu 255 Zeichen, eindeutig.",{"description":243,"x-description-ru":244,"x-description-de":245,"type":194},"\u003Cp>Saved only when the account has no email yet.\u003C\u002Fp>","Сохраняется, только если у аккаунта ещё нет email.","Wird nur gespeichert, wenn das Konto noch keine E-Mail hat.",{"description":247,"x-description-ru":248,"x-description-de":249,"type":194},"\u003Cp>New password, at least 6 characters.\u003C\u002Fp>","Новый пароль, не короче 6 символов.","Neues Passwort, mindestens 6 Zeichen.",{"description":251,"x-description-ru":252,"x-description-de":253,"type":194},"\u003Cp>The same as \u003Ccode>password\u003C\u002Fcode>.\u003C\u002Fp>","То же, что `password`.","Derselbe Wert wie `password`.",{"description":255,"x-description-ru":256,"x-description-de":257,"type":194},"\u003Cp>Current password; required with \u003Ccode>password\u003C\u002Fcode>.\u003C\u002Fp>","Текущий пароль; обязателен вместе с `password`.","Aktuelles Passwort; zusammen mit `password` erforderlich.","object",{"200":260,"429":377,"456":394},{"description":261,"x-description-ru":262,"x-description-de":263,"content":264},"\u003Cp>Saved account, validation errors, or an error code:\u003C\u002Fp>\n\u003Cul>\n  \u003Cli>\u003Ccode>ERROR_PARAMS\u003C\u002Fcode> — \u003Ccode>profile\u003C\u002Fcode> is missing or not an object\u003C\u002Fli>\n  \u003Cli>\u003Ccode>Query Exception\u003C\u002Fcode> — the database rejected the change\u003C\u002Fli>\n\u003C\u002Ful>","Сохранённый аккаунт, ошибки валидации или код ошибки:\n- `ERROR_PARAMS` — `profile` не передан или не является объектом\n- `Query Exception` — база данных отклонила изменение\n","Gespeichertes Konto, Validierungsfehler oder ein Fehlercode:\n- `ERROR_PARAMS` — `profile` fehlt oder ist kein Objekt\n- `Query Exception` — die Datenbank hat die Änderung abgelehnt\n",{"application\u002Fjson":265},{"schema":266,"examples":363},{"oneOf":267},[268,342,349,356],{"required":269,"properties":272,"type":258},[270,271],"response","user",{"response":273,"user":276},{"type":194,"enum":274,"example":275},[275],"1",{"description":277,"x-description-ru":278,"x-description-de":279,"properties":280,"type":258},"\u003Cp>The user account as stored (\u003Ccode>getProfile\u003C\u002Fcode> → \u003Ccode>profile\u003C\u002Fcode>, \u003Ccode>profile.php\u003C\u002Fcode> → \u003Ccode>user\u003C\u002Fcode>). More fields than listed may appear.\u003C\u002Fp>","Аккаунт пользователя в сохранённом виде (`getProfile` → `profile`, `profile.php` → `user`). Могут приходить и поля, не перечисленные здесь.","Das Benutzerkonto wie gespeichert (`getProfile` → `profile`, `profile.php` → `user`). Es können weitere, hier nicht aufgeführte Felder vorkommen.",{"id":281,"hash_id":283,"name":285,"username":288,"email":290,"email_verified_at":293,"apikey":295,"api_access":296,"locale":305,"currency":306,"number_country":308,"number_reject":310,"number_region":319,"webhook_url":324,"number":329,"country":331,"is_api":333,"active":334,"block":335,"disable":336,"verify":337,"ugroup":338,"first_login":339,"is_project_subscription":340,"created_at":341},{"type":222,"example":282},100001,{"type":284},[194,215],{"type":286,"example":287},[194,215],"John",{"type":289},[194,215],{"type":291,"example":292},[194,215],"user@example.com",{"type":294},[194,215],{"type":194},{"description":297,"x-description-ru":298,"x-description-de":299,"oneOf":300},"\u003Cp>API access: \u003Ccode>false\u003C\u002Fcode> — off, \u003Ccode>true\u003C\u002Fcode> — on from any IP, or an object \u003Ccode>{\"&lt;ip&gt;\": \"&lt;ip&gt;\"}\u003C\u002Fcode> — on only from these IPs.\u003C\u002Fp>","Доступ к API: `false` — выключен, `true` — включён с любых IP, или объект `{\"\u003Cip>\": \"\u003Cip>\"}` — включён только с этих IP.","API-Zugriff: `false` — aus, `true` — von jeder IP aus erlaubt, oder ein Objekt `{\"\u003Cip>\": \"\u003Cip>\"}` — nur von diesen IPs aus erlaubt.",[301,303],{"type":302},"boolean",{"type":258,"additionalProperties":304},{"type":194},{"type":194,"example":5},{"type":194,"example":307},"USD",{"description":219,"x-description-ru":220,"x-description-de":221,"type":309,"example":223},[222,215],{"description":311,"x-description-ru":312,"x-description-de":313,"oneOf":314},"\u003Cp>Default number prefixes skipped by getNum; \u003Ccode>null\u003C\u002Fcode> when never set, \u003Ccode>{}\u003C\u002Fcode> when emptied.\u003C\u002Fp>","Префиксы номеров, которые getNum пропускает по умолчанию; `null`, если ни разу не задавались, `{}`, если список очищен.","Standard-Nummernpräfixe, die getNum überspringt; `null`, wenn nie gesetzt, `{}`, wenn geleert.",[315,317,318],{"type":230,"items":316},{"type":194},{"type":258},{"type":215},{"description":320,"x-description-ru":321,"x-description-de":322,"type":323},"\u003Cp>Not used by the service; always \u003Ccode>null\u003C\u002Fcode>.\u003C\u002Fp>","Сервисом не используется; всегда `null`.","Wird vom Dienst nicht verwendet; immer `null`.",[222,215],{"description":325,"x-description-ru":326,"x-description-de":327,"type":328},"\u003Cp>URL that receives the \u003Ccode>newSms\u003C\u002Fcode> webhook; \u003Ccode>null\u003C\u002Fcode> or empty — no webhooks.\u003C\u002Fp>","URL, на который приходит вебхук `newSms`; `null` или пустая строка — вебхуки не отправляются.","URL, an die der Webhook `newSms` gesendet wird; `null` oder leer — keine Webhooks.",[194,215],{"type":330},[222,215],{"type":332},[194,215],{"type":302},{"type":194},{"type":222},{"type":302},{"type":222},{"type":222},{"type":302},{"type":302},{"type":194},{"description":343,"x-description-ru":344,"x-description-de":345,"required":346,"properties":347,"type":258},"\u003Cp>Validation errors: field → list of messages; a wrong \u003Ccode>old_password\u003C\u002Fcode> gives \u003Ccode>{\"old_password\": \"&lt;message&gt;\"}\u003C\u002Fcode>.\u003C\u002Fp>","Ошибки валидации: поле → список сообщений; неверный `old_password` даёт `{\"old_password\": \"\u003Cсообщение>\"}`.","Validierungsfehler: Feld → Liste von Meldungen; ein falsches `old_password` ergibt `{\"old_password\": \"\u003CMeldung>\"}`.",[270],{"response":348},{"type":258,"additionalProperties":199},{"required":350,"properties":351,"type":258},[270],{"response":352},{"type":194,"enum":353},[354,355],"ERROR_PARAMS","Query Exception",{"required":357,"properties":358,"type":258,"additionalProperties":199},[270],{"response":359},{"description":360,"x-description-ru":361,"x-description-de":362,"type":194},"\u003Cp>Error code. The codes any method can return are listed in the introduction; each method lists its own.\nThe list is not closed: treat an unknown code as a generic error and log it.\u003C\u002Fp>","Код ошибки. Коды, которые может вернуть любой метод, перечислены во введении; у каждого метода — свои. Список не закрыт: неизвестный код обрабатывайте как общую ошибку и записывайте в лог.","Fehlercode. Die Codes, die jede Methode liefern kann, stehen in der Einleitung; jede Methode führt ihre eigenen auf. Die Liste ist nicht geschlossen: behandeln Sie einen unbekannten Code als allgemeinen Fehler und protokollieren Sie ihn.",{"Validation error":364,"ERROR_PARAMS":372},{"summary":365,"x-summary-ru":366,"x-summary-de":367,"value":368},"\u003Cp>\u003Ccode>webhook_url\u003C\u002Fcode> is not a URL\u003C\u002Fp>","`webhook_url` — не URL","`webhook_url` ist keine URL",{"response":369},{"webhook_url":370},[371],"The webhook url field must be a valid URL.",{"summary":373,"x-summary-ru":374,"x-summary-de":375,"value":376},"\u003Cp>\u003Ccode>profile\u003C\u002Fcode> not passed\u003C\u002Fp>","`profile` не передан","`profile` nicht übergeben",{"response":354},{"description":378,"x-description-ru":379,"x-description-de":380,"content":381},"\u003Cp>HTTP 429: more than 400 requests per minute from one profile (from one IP for requests without a key), or more than 200 requests per minute from one profile to getNum, getPrice, getState and setOperationOk together\u003C\u002Fp>","HTTP 429: больше 400 запросов в минуту с одного профиля (с одного IP для запросов без ключа) или больше 200 запросов в минуту с одного профиля к getNum, getPrice, getState и setOperationOk вместе","HTTP 429: mehr als 400 Anfragen pro Minute von einem Profil (von einer IP bei Anfragen ohne Schlüssel) oder mehr als 200 Anfragen pro Minute von einem Profil an getNum, getPrice, getState und setOperationOk zusammen",{"application\u002Fjson":382},{"schema":383,"examples":387},{"required":384,"properties":385,"type":258,"additionalProperties":199},[270],{"response":386},{"description":360,"x-description-ru":361,"x-description-de":362,"type":194},{"Rate limit":388},{"summary":389,"x-summary-ru":390,"x-summary-de":391,"value":392},"\u003Cp>Request rate limit exceeded\u003C\u002Fp>","Превышен лимит запросов","Anfragelimit überschritten",{"response":393},"TRY_AGAIN_LATER",{"description":395,"x-description-ru":396,"x-description-de":397,"content":398},"\u003Cp>HTTP 456: the API key is invalid or the OAuth token has expired. Public methods answer the same way when an\ninvalid key is sent\u003C\u002Fp>","HTTP 456: API-ключ неверный или OAuth-токен истёк. Публичные методы отвечают так же, если передан неверный ключ","HTTP 456: Der API-Schlüssel ist ungültig oder das OAuth-Token ist abgelaufen. Öffentliche Methoden antworten genauso, wenn ein ungültiger Schlüssel übergeben wird",{"application\u002Fjson":399},{"schema":400,"examples":404},{"required":401,"properties":402,"type":258,"additionalProperties":199},[270],{"response":403},{"description":360,"x-description-ru":361,"x-description-de":362,"type":194},{"Invalid key":405},{"summary":406,"x-summary-ru":407,"x-summary-de":408,"value":409},"\u003Cp>Invalid API key or expired token\u003C\u002Fp>","Неверный API-ключ или истёкший токен","Ungültiger API-Schlüssel oder abgelaufenes Token",{"response":410},"ERROR_WRONG_KEY",[412,414,416],{"apikey":413},[],{"BearerAuth":415},[],{"OAuth2":417},[],{"apikey":419,"BearerAuth":425,"OAuth2":431},{"type":420,"description":421,"x-description-ru":422,"x-description-de":423,"name":424,"in":189},"apiKey","\u003Cp>API key is a secret key for a simplified authorization in Onlinesim API.\u003C\u002Fp>\n\u003Chr>\n\u003Ch4>How to get an API key:\u003C\u002Fh4>\n\u003Col>\n  \u003Cli>Log in to personal account, go to the \u003Ca href=\"\u002Fv2\u002Fprofile\u002F\">Profile\u003C\u002Fa> and click on \u003Cstrong>API\u003C\u002Fstrong> tab.\u003C\u002Fli>\n  \u003Cli>Copy the key from the \u003Ccode>API Key\u003C\u002Fcode> field and add it to your application.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Chr>\n\u003Ch4>How to use it:\u003C\u002Fh4>\n\u003Col>\n  \u003Cli>All Onlinesim API requests must contain an API key, except the public ones: \u003Ca href=\"\u002Fopenapi_docs\u002FOnlinesim-API-UN\u002FOnlinesim-API-UN-get-api-gettariffs-php\">getTariffs\u003C\u002Fa>, \u003Ca href=\"\u002Fopenapi_docs\u002FOnlinesim-API-UN\u002FOnlinesim-API-UN-get-api-getnumbersstats-php\">getNumbersStats\u003C\u002Fa>, \u003Ca href=\"\u002Fopenapi_docs\u002FOnlinesim-API-UN\u002FOnlinesim-API-UN-get-api-rent-tariffsrent-php\">tariffsRent\u003C\u002Fa> and \u003Ca href=\"\u002Fopenapi_docs\u002FOnlinesim-API-UN\u002FOnlinesim-API-UN-get-api-getfreelist\">getFreeList\u003C\u002Fa>. A public method still checks a key if one is sent.\u003C\u002Fli>\n  \u003Cli>\n    \u003Cp>API key can be specified as a query parameter, for example:\u003C\u002Fp>\n    \u003Cpre data-lang=\"text\">\u003Ccode class=\"code-hl code-ln\" style=\"--ln-digits:1\">\u003Cspan class=\"line\">   https:\u002F\u002Fonlinesim.io\u002Fapi\u002FgetBalance.php?apikey={apikey}\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\n    \u003Cp>It is also accepted in the \u003Ccode>Authorization: Bearer\u003C\u002Fcode> header (see BearerAuth), in an \u003Ccode>apikey\u003C\u002Fcode> header, as an\n    \u003Ccode>apikey\u003C\u002Fcode> field of a POST body, and under the name \u003Ccode>key\u003C\u002Fcode> in any of these places.\u003C\u002Fp>\n  \u003C\u002Fli>\n\u003C\u002Fol>\n\u003Caside class=\"my-4 rounded-lg border p-4 text-sm leading-relaxed not-prose border-brand-200 bg-brand-50 text-brand-950 theme-dark:text-gray-800\" role=\"note\">\u003Cdiv class=\"openapi-callout-body [&amp;_p:last-child]:mb-0 [&amp;_p]:mb-2\">\u003Cp>Using an API key provides a simplified way to authorize requests. We recommend using OAuth 2.0 for more secure data handling.\u003C\u002Fp>\n\u003Cp>For detailed information, please refer to the official \u003Ca href=\"https:\u002F\u002Foauth.net\u002F2\u002F\" target=\"_blank\" rel=\"noopener noreferrer\">OAuth 2.0 documentation\u003C\u002Fa>.\u003C\u002Fp>\n\u003C\u002Fdiv>\u003C\u002Faside>","Секретный ключ, используемый для упрощенной авторизации в API Onlinesim.\n\n---\n\n#### Как получить API ключ:\n\n1. Авторизоваться в личном кабинете, перейти в [настройки профиля](https:\u002F\u002Fonlinesim.io\u002Fv2\u002Fprofile\u002F), выбрать вкладку **API**.\n2. Ключ будет указан в строке `API key`. Его необходимо скопировать и добавить в Ваше приложение\u002Fпрограмму.\n\n---\n\n#### Как использовать:\n\n1. Все запросы к текущемуAPI Onlinesim (кроме публичных: [getTariffs](\u002Fru\u002FOnlinesim-API-UN\u002FOnlinesim-API-UN-get-api-gettariffs-php), [getNumbersStats](\u002Fru\u002FOnlinesim-API-UN\u002FOnlinesim-API-UN-get-api-getnumbersstats-php), [tariffsRent](\u002Fru\u002FOnlinesim-API-UN\u002FOnlinesim-API-UN-get-api-rent-tariffsrent-php) и [getFreeList](\u002Fru\u002FOnlinesim-API-UN\u002FOnlinesim-API-UN-get-api-getfreelist)) должны содержать API ключ. Публичный метод всё равно проверяет ключ, если он передан.\n2. API ключ можно указать как параметр запроса, например:\n\n          https:\u002F\u002Fonlinesim.io\u002Fapi\u002FgetBalance.php?apikey={apikey}\n\n   Ключ также принимается в заголовке `Authorization: Bearer` (см. BearerAuth), в заголовке `apikey`, в поле `apikey` тела POST-запроса и под именем `key` в любом из этих мест.\n\n::: tip\nИспользование API ключа представляет собой способ для упрощенной авторизации запросов. Мы рекомендуем использовать OAuth 2.0 для более безопасной работы с данными.\n\nДля получения более подробной информации, пожалуйста, обратитесь к [официальной документации OAuth 2.0](https:\u002F\u002Foauth.net\u002F2\u002F).\n:::\n","Geheimer Schlüssel, der für die vereinfachte Autorisierung in der Onlinesim API verwendet wird.\n\n---\n\n#### So erhalten Sie einen API-Schlüssel:\n\n1. Melden Sie sich im persönlichen Konto an, gehen Sie zu den [Profileinstellungen](https:\u002F\u002Fonlinesim.io\u002Fv2\u002Fprofile\u002F), wählen Sie die Registerkarte **API**.\n2. Der Schlüssel wird in der Zeile `API key` angezeigt. Er muss kopiert und zu Ihrer Anwendung\u002FProgramm hinzugefügt werden.\n\n---\n\n#### So verwenden Sie ihn:\n\n1. Alle Anfragen an die aktuelle Onlinesim API (außer den öffentlichen: [getTariffs](\u002Fde\u002FOnlinesim-API-UN\u002FOnlinesim-API-UN-get-api-gettariffs-php), [getNumbersStats](\u002Fde\u002FOnlinesim-API-UN\u002FOnlinesim-API-UN-get-api-getnumbersstats-php), [tariffsRent](\u002Fde\u002FOnlinesim-API-UN\u002FOnlinesim-API-UN-get-api-rent-tariffsrent-php) und [getFreeList](\u002Fde\u002FOnlinesim-API-UN\u002FOnlinesim-API-UN-get-api-getfreelist)) müssen einen API-Schlüssel enthalten. Eine öffentliche Methode prüft einen übergebenen Schlüssel trotzdem.\n2. Der API-Schlüssel kann als Anfrageparameter angegeben werden, z. B.:\n\n          https:\u002F\u002Fonlinesim.io\u002Fapi\u002FgetBalance.php?apikey={apikey}\n\n   Der Schlüssel wird auch im Header `Authorization: Bearer` (siehe BearerAuth), in einem Header `apikey`, als Feld `apikey` eines POST-Bodys und unter dem Namen `key` an jeder dieser Stellen akzeptiert.\n\n::: tip\nDie Verwendung des API-Schlüssels ist eine Methode zur vereinfachten Autorisierung von Anfragen. Wir empfehlen die Verwendung von OAuth 2.0 für eine sicherere Arbeit mit Daten.\n\nFür weitere Informationen wenden Sie sich bitte an die [offizielle OAuth 2.0-Dokumentation](https:\u002F\u002Foauth.net\u002F2\u002F).\n:::\n","apikey",{"type":426,"description":427,"x-description-ru":428,"x-description-de":429,"scheme":430},"http","\u003Cp>The API key can also be used for authorization in the request header using the \u003Ccode>Authorization: Bearer\u003C\u002Fcode> scheme, for example:\u003C\u002Fp>\n\u003Cpre data-lang=\"bash\">\u003Ccode class=\"code-hl code-ln\" style=\"--ln-digits:1\">\u003Cspan class=\"line\">\u003Cspan class=\"tok-fn\">curl\u003C\u002Fspan> \u003Cspan class=\"tok-var\">-H\u003C\u002Fspan> \u003Cspan class=\"tok-string\">&quot;Authorization: Bearer {apikey}&quot;\u003C\u002Fspan> https:\u002F\u002Fonlinesim.io\u002Fapi\u002FgetBalance.php\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003Cp>The same header carries an OAuth 2.0 access token (see OAuth2).\u003C\u002Fp>\n\u003Caside class=\"my-4 rounded-lg border p-4 text-sm leading-relaxed not-prose border-brand-200 bg-brand-50 text-brand-950 theme-dark:text-gray-800\" role=\"note\">\u003Cdiv class=\"openapi-callout-body [&amp;_p:last-child]:mb-0 [&amp;_p]:mb-2\">\u003Cp>Using an API key provides a simplified way to authorize requests. We recommend using OAuth 2.0 for more secure data handling.\u003C\u002Fp>\n\u003Cp>For detailed information, please refer to the official \u003Ca href=\"https:\u002F\u002Foauth.net\u002F2\u002F\" target=\"_blank\" rel=\"noopener noreferrer\">OAuth 2.0 documentation\u003C\u002Fa>.\u003C\u002Fp>\n\u003C\u002Fdiv>\u003C\u002Faside>","API ключ также можно использовать для авторизации в заголовке запроса, используя схему `Authorization: Bearer`, например:\n\n```bash\ncurl -H \"Authorization: Bearer {apikey}\" https:\u002F\u002Fonlinesim.io\u002Fapi\u002FgetBalance.php\n```\n\nТот же заголовок передаёт access token OAuth 2.0 (см. OAuth2).\n\n::: tip\nИспользование API ключа представляет собой способ для упрощенной авторизации запросов. Мы рекомендуем использовать OAuth 2.0 для более безопасной работы с данными.\n\nДля получения более подробной информации, пожалуйста, обратитесь к [официальной документации OAuth 2.0](https:\u002F\u002Foauth.net\u002F2\u002F).\n:::\n","Der API-Schlüssel kann auch für die Autorisierung im Anfrageheader verwendet werden, indem das Schema `Authorization: Bearer` verwendet wird, z. B.:\n\n```bash\ncurl -H \"Authorization: Bearer {apikey}\" https:\u002F\u002Fonlinesim.io\u002Fapi\u002FgetBalance.php\n```\n\nDerselbe Header überträgt ein OAuth 2.0 Access Token (siehe OAuth2).\n\n::: tip\nDie Verwendung des API-Schlüssels ist eine Methode zur vereinfachten Autorisierung von Anfragen. Wir empfehlen die Verwendung von OAuth 2.0 für eine sicherere Arbeit mit Daten.\n\nFür weitere Informationen wenden Sie sich bitte an die [offizielle OAuth 2.0-Dokumentation](https:\u002F\u002Foauth.net\u002F2\u002F).\n:::\n","bearer",{"type":432,"description":433,"x-description-ru":434,"x-description-de":435,"flows":436},"oauth2","\u003Cp>\u003Cspan id=\"OAUTH\">\u003C\u002Fspan>\u003C\u002Fp>\n\u003Ch3>OAuth 2.0\u003C\u002Fh3>\n\u003Cp>The OAuth 2.0 authorization protocol provides several authorization scenarios, in our case Authorization Code and Implicit Flow types are available.\u003C\u002Fp>\n\u003Caside class=\"my-4 rounded-lg border p-4 text-sm leading-relaxed not-prose border-brand-200 bg-brand-50 text-brand-950 theme-dark:text-gray-800\" role=\"note\">\u003Cdiv class=\"openapi-callout-body [&amp;_p:last-child]:mb-0 [&amp;_p]:mb-2\">For detailed information, please refer to the official \u003Ca href=\"https:\u002F\u002Foauth.net\u002F2\u002F\" target=\"_blank\" rel=\"noopener noreferrer\">OAuth 2.0 documentation\u003C\u002Fa>.\u003C\u002Fdiv>\u003C\u002Faside>\u003Cp>\u003Cstrong>Authorization URL\u003C\u002Fstrong>: \u003Ccode>https:\u002F\u002Fonlinesim.io\u002Foauth\u002Fauthorize\u003C\u002Fcode>\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Token URL\u003C\u002Fstrong>: \u003Ccode>https:\u002F\u002Fonlinesim.io\u002Foauth\u002Ftoken\u003C\u002Fcode>\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Scopes\u003C\u002Fstrong>:\u003C\u002Fp>\n\u003Cul>\n  \u003Cli>\u003Ccode>sms-scope\u003C\u002Fcode> grants access to manage numbers for the SMS receiving service from Onlinesim;\u003C\u002Fli>\n  \u003Cli>\u003Ccode>rent-scope\u003C\u002Fcode> grants access to renting phone numbers from Onlinesim;\u003C\u002Fli>\n  \u003Cli>\u003Ccode>free-scope\u003C\u002Fcode> grants access to using Onlinesim's free numbers.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>A scope is checked only where the method needs it: \u003Ccode>sms-scope\u003C\u002Fcode> — getTariffs and getNumbersStats,\n\u003Ccode>rent-scope\u003C\u002Fcode> — the rent methods, \u003Ccode>free-scope\u003C\u002Fcode> — getFreeList. The other methods accept any valid token.\nA token issued without \u003Ccode>scope\u003C\u002Fcode> gets \u003Ccode>sms-scope\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Cp>An access token lives 2 months, a refresh token 4 months (\u003Ccode>expires_in\u003C\u002Fcode> in the token answer is in seconds).\u003C\u002Fp>\n\u003Ch3>\u003Cstrong>Register the app in our authorization service\u003C\u002Fstrong>\u003C\u002Fh3>\n\u003Col>\n  \u003Cli>Open \u003Ca href=\"\u002Foauth\">OAuth\u003C\u002Fa> page\u003C\u002Fli>\n  \u003Cli>\n    \u003Cp>Add your app by clicking \"Create New Client\", then fill the fields below:\u003C\u002Fp>\n    \u003Cul>\n      \u003Cli>\u003Ccode>Name\u003C\u002Fcode> - could be the app name or any other name you and your users will associate with the app;\u003C\u002Fli>\n      \u003Cli>\u003Ccode>Redirect URL\u003C\u002Fcode> - after user authorization on our server, the client will be redirected with authorization code to this URL.\u003C\u002Fli>\n      \u003Cli>\n        \u003Ccode>Confidential\u003C\u002Fcode> - (optional), mark the client as \u003Cu>Confidential\u003C\u002Fu> if your application runs on a server and can securely store the \u003Cu>Client Secret\u003C\u002Fu>.\n      \u003C\u002Fli>\n    \u003C\u002Ful>\n  \u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>\u003Cimg src=\"\u002Fopenapi_docs\u002Fdocs\u002FCreateOAuthClient.png\" alt=\"Client creation\">\u003C\u002Fp>\n\u003Col start=\"3\">\n  \u003Cli>Click \"Create\". New client will appear in the list of applications.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>\u003Cimg src=\"\u002Fopenapi_docs\u002Fdocs\u002FOAuthClient.png\" alt=\"Client list\">\u003C\u002Fp>\n\u003Col start=\"4\">\n  \u003Cli>Save the \u003Ccode>Client ID\u003C\u002Fcode> and \u003Ccode>Secret\u003C\u002Fcode> in a secure location; they will be used by your application for authorization.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>\u003Cspan id=\"AUTHCODE\">\u003C\u002Fspan>\u003C\u002Fp>\n\u003Ch3>OAuth 2.0. Authorization code flow\u003C\u002Fh3>\n\u003Ch4>\u003Cstrong>Authorize a user and get a token\u003C\u002Fstrong>\u003C\u002Fh4>\n\u003Col>\n  \u003Cli>Authorize a client with a GET request to \u003Ccode>https:\u002F\u002Fonlinesim.io\u002Foauth\u002Fauthorize\u003C\u002Fcode> with parameters \u003Ccode>client_id\u003C\u002Fcode>, \u003Ccode>redirect_uri\u003C\u002Fcode>, \u003Ccode>response_type\u003C\u002Fcode>, \u003Ccode>scope\u003C\u002Fcode>, \u003Ccode>state\u003C\u002Fcode>:\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Ch5>Parameter Description\u003C\u002Fh5>\n\u003Ctable>\n  \u003Cthead>\n    \u003Ctr>\n      \u003Cth>Parameter Name\u003C\u002Fth>\n      \u003Cth style=\"text-align:center\">Data Type\u003C\u002Fth>\n      \u003Cth>Description\u003C\u002Fth>\n    \u003C\u002Ftr>\n  \u003C\u002Fthead>\n  \u003Ctbody>\n    \u003Ctr>\n      \u003Ctd>client_id\u003C\u002Ftd>\n      \u003Ctd style=\"text-align:center\">STRING\u003C\u002Ftd>\n      \u003Ctd>\u003Ccode>Client ID\u003C\u002Fcode> (returned when the app registration process is complete)\u003C\u002Ftd>\n    \u003C\u002Ftr>\n    \u003Ctr>\n      \u003Ctd>redirect_uri\u003C\u002Ftd>\n      \u003Ctd style=\"text-align:center\">STRING\u003C\u002Ftd>\n      \u003Ctd>Redirect destination for the client after a successful authorization, it must match the value of \u003Ccode>Redirect URL\u003C\u002Fcode> field you've set during app registration process.\u003C\u002Ftd>\n    \u003C\u002Ftr>\n    \u003Ctr>\n      \u003Ctd>response_type\u003C\u002Ftd>\n      \u003Ctd style=\"text-align:center\">STRING\u003C\u002Ftd>\n      \u003Ctd>Use \u003Ccode>code\u003C\u002Fcode> as a value for Authorization code flow\u003C\u002Ftd>\n    \u003C\u002Ftr>\n    \u003Ctr>\n      \u003Ctd>scope\u003C\u002Ftd>\n      \u003Ctd style=\"text-align:center\">STRING\u003C\u002Ftd>\n      \u003Ctd>Access rights that your app asks from the user. Possible values: \u003Ccode>sms-scope\u003C\u002Fcode>, \u003Ccode>rent-scope\u003C\u002Fcode>, \u003Ccode>free-scope\u003C\u002Fcode>. You can specify multiple values\u003C\u002Ftd>\n    \u003C\u002Ftr>\n    \u003Ctr>\n      \u003Ctd>state\u003C\u002Ftd>\n      \u003Ctd style=\"text-align:center\">STRING\u003C\u002Ftd>\n      \u003Ctd>A random string for CSRF protection (verify it after the redirect)\u003C\u002Ftd>\n    \u003C\u002Ftr>\n    \u003Ctr>\n      \u003Ctd>code_challenge\u003C\u002Ftd>\n      \u003Ctd style=\"text-align:center\">STRING\u003C\u002Ftd>\n      \u003Ctd>Required for a client that is not Confidential (PKCE): BASE64URL(SHA256(\u003Ccode>code_verifier\u003C\u002Fcode>))\u003C\u002Ftd>\n    \u003C\u002Ftr>\n    \u003Ctr>\n      \u003Ctd>code_challenge_method\u003C\u002Ftd>\n      \u003Ctd style=\"text-align:center\">STRING\u003C\u002Ftd>\n      \u003Ctd>\u003Ccode>S256\u003C\u002Fcode>\u003C\u002Ftd>\n    \u003C\u002Ftr>\n  \u003C\u002Ftbody>\n\u003C\u002Ftable>\n\u003Col start=\"2\">\n  \u003Cli>After the request to \u003Ccode>https:\u002F\u002Fonlinesim.io\u002Foauth\u002Fauthorize\u003C\u002Fcode> is sent, the user from your app will be redirected to the authorization page to enter the login and password. If successful, authorize your app to work with user data in the Onlinesim service. To do so, he has to click on the \u003Cem>\u003Ccode>Authorize\u003C\u002Fcode>\u003C\u002Fem> button:\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>\u003Cimg src=\"\u002Fopenapi_docs\u002Fdocs\u002FOAuthRequest.png\" alt=\"OAuth request\">\u003C\u002Fp>\n\u003Caside class=\"my-4 rounded-lg border p-4 text-sm leading-relaxed not-prose border-brand-200 bg-brand-50 text-brand-950 theme-dark:text-gray-800\" role=\"note\">\u003Cdiv class=\"openapi-callout-body [&amp;_p:last-child]:mb-0 [&amp;_p]:mb-2\">At this point, you can check the \u003Ccode>state\u003C\u002Fcode>\n parameter, to confirm secure communication with the authorization service\u003C\u002Fdiv>\u003C\u002Faside>\u003Col start=\"3\">\n  \u003Cli>If the authorization is successful, the user will be redirected to \u003Ccode>redirect_uri\u003C\u002Fcode> with the parameter \u003Ccode>code\u003C\u002Fcode>. Now you can get the \u003Ccode>access token\u003C\u002Fcode> after making a POST request to \u003Ccode>https:\u002F\u002Fonlinesim.io\u002Foauth\u002Ftoken\u003C\u002Fcode>:\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Ch5>Parameter Description\u003C\u002Fh5>\n\u003Ctable>\n  \u003Cthead>\n    \u003Ctr>\n      \u003Cth>Parameter name\u003C\u002Fth>\n      \u003Cth style=\"text-align:center\">Data type\u003C\u002Fth>\n      \u003Cth>Description\u003C\u002Fth>\n    \u003C\u002Ftr>\n  \u003C\u002Fthead>\n  \u003Ctbody>\n    \u003Ctr>\n      \u003Ctd>grant_type\u003C\u002Ftd>\n      \u003Ctd style=\"text-align:center\">STRING\u003C\u002Ftd>\n      \u003Ctd>Authorization scenario type, use \u003Ccode>authorization_code\u003C\u002Fcode> when using the Authorization Code flow.\u003C\u002Ftd>\n    \u003C\u002Ftr>\n    \u003Ctr>\n      \u003Ctd>client_id\u003C\u002Ftd>\n      \u003Ctd style=\"text-align:center\">STRING\u003C\u002Ftd>\n      \u003Ctd>\u003Ccode>Client ID\u003C\u002Fcode> (returned when the app registration process is complete)\u003C\u002Ftd>\n    \u003C\u002Ftr>\n    \u003Ctr>\n      \u003Ctd>client_secret\u003C\u002Ftd>\n      \u003Ctd style=\"text-align:center\">STRING\u003C\u002Ftd>\n      \u003Ctd>\u003Ccode>Client_secret\u003C\u002Fcode> (returned when the app registration process is complete)\u003C\u002Ftd>\n    \u003C\u002Ftr>\n    \u003Ctr>\n      \u003Ctd>redirect_uri\u003C\u002Ftd>\n      \u003Ctd style=\"text-align:center\">STRING\u003C\u002Ftd>\n      \u003Ctd>Redirect URL for the client after a successful authorization, it must match the \u003Ccode>Redirect URL\u003C\u002Fcode> parameter used during app registration process.\u003C\u002Ftd>\n    \u003C\u002Ftr>\n    \u003Ctr>\n      \u003Ctd>code\u003C\u002Ftd>\n      \u003Ctd style=\"text-align:center\">STRING\u003C\u002Ftd>\n      \u003Ctd>Authorization code, obtained in the previous step\u003C\u002Ftd>\n    \u003C\u002Ftr>\n    \u003Ctr>\n      \u003Ctd>code_verifier\u003C\u002Ftd>\n      \u003Ctd style=\"text-align:center\">STRING\u003C\u002Ftd>\n      \u003Ctd>The random string the \u003Ccode>code_challenge\u003C\u002Fcode> was made from (clients that are not Confidential)\u003C\u002Ftd>\n    \u003C\u002Ftr>\n  \u003C\u002Ftbody>\n\u003C\u002Ftable>\n\u003Caside class=\"my-4 rounded-lg border p-4 text-sm leading-relaxed not-prose border-red-200 bg-red-50 text-red-950 theme-dark:text-red-800\" role=\"note\">\u003Cdiv class=\"openapi-callout-body [&amp;_p:last-child]:mb-0 [&amp;_p]:mb-2\">Since \u003Ccode>client_secret\u003C\u002Fcode>\n is a private key, it is not recommended to store it in the frontend of the client. For better security, you should store it in the backend of your app. To implement the Authorization Code scenario, you need to pass this code from the frontend to the backend of your service.\u003C\u002Fdiv>\u003C\u002Faside>\u003Col start=\"4\">\n  \u003Cli>As a result of a successful request to \u003Ccode>https:\u002F\u002Fonlinesim.io\u002Foauth\u002Ftoken\u003C\u002Fcode>, you get JSON in response, which contains \u003Ccode>access_token\u003C\u002Fcode>, \u003Ccode>refresh_token\u003C\u002Fcode>, and \u003Ccode>expires_in\u003C\u002Fcode> attributes. The \u003Ccode>expires_in\u003C\u002Fcode> attribute contains the number of seconds before the access token is expired and the \u003Ccode>refresh_token\u003C\u002Fcode> is used to renew the access token when it expires.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Chr>\n\u003Ch4>\u003Cstrong>Authorization and token refreshment\u003C\u002Fstrong>\u003C\u002Fh4>\n\u003Cp>For all API requests, add the \u003Cstrong>Authorization: Bearer \u003Cem>\u003Ccode>access_token\u003C\u002Fcode>\u003C\u002Fem>\u003C\u002Fstrong> header.\nIf your request results in \u003Ccode>ERROR_WRONG_KEY\u003C\u002Fcode> (HTTP 456), you need to refresh your token or get a new one.\u003C\u002Fp>\n\u003Cpre data-lang=\"json\">\u003Ccode class=\"code-hl code-ln\" style=\"--ln-digits:1\">\u003Cspan class=\"line\">\u003Cspan class=\"tok-punct\">{\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">  \u003Cspan class=\"tok-key\">&quot;response&quot;\u003C\u002Fspan>\u003Cspan class=\"tok-punct\">:\u003C\u002Fspan> \u003Cspan class=\"tok-string\">&quot;ERROR_WRONG_KEY&quot;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan class=\"tok-punct\">}\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003Cp>To refresh the token you must make a POST request to \u003Ccode>https:\u002F\u002Fonlinesim.io\u002Foauth\u002Ftoken\u003C\u002Fcode> with the parameters \u003Ccode>grant_type\u003C\u002Fcode>, \u003Ccode>client_id\u003C\u002Fcode>, \u003Ccode>client_secret\u003C\u002Fcode>, and \u003Ccode>refresh_token\u003C\u002Fcode>. For the \u003Ccode>refresh_token\u003C\u002Fcode> field, use the value obtained in step 4.\u003C\u002Fp>\n\u003Ch5>Parameter Description\u003C\u002Fh5>\n\u003Ctable>\n  \u003Cthead>\n    \u003Ctr>\n      \u003Cth>Parameter name\u003C\u002Fth>\n      \u003Cth style=\"text-align:center\">Data type\u003C\u002Fth>\n      \u003Cth>Description\u003C\u002Fth>\n    \u003C\u002Ftr>\n  \u003C\u002Fthead>\n  \u003Ctbody>\n    \u003Ctr>\n      \u003Ctd>grant_type\u003C\u002Ftd>\n      \u003Ctd style=\"text-align:center\">STRING\u003C\u002Ftd>\n      \u003Ctd>Use \u003Ccode>refresh_token\u003C\u002Fcode> as a value\u003C\u002Ftd>\n    \u003C\u002Ftr>\n    \u003Ctr>\n      \u003Ctd>client_id\u003C\u002Ftd>\n      \u003Ctd style=\"text-align:center\">STRING\u003C\u002Ftd>\n      \u003Ctd>\u003Ccode>Client ID\u003C\u002Fcode> (returned when the app registration process is complete)\u003C\u002Ftd>\n    \u003C\u002Ftr>\n    \u003Ctr>\n      \u003Ctd>client_secret\u003C\u002Ftd>\n      \u003Ctd style=\"text-align:center\">STRING\u003C\u002Ftd>\n      \u003Ctd>\u003Ccode>Client_secret\u003C\u002Fcode> (returned when the app registration process is complete)\u003C\u002Ftd>\n    \u003C\u002Ftr>\n    \u003Ctr>\n      \u003Ctd>refresh_token\u003C\u002Ftd>\n      \u003Ctd style=\"text-align:center\">STRING\u003C\u002Ftd>\n      \u003Ctd>\u003Ccode>Refresh_token\u003C\u002Fcode> is obtained along with the \u003Ccode>access_token\u003C\u002Fcode>. It has a much longer lifetime and is used to refresh \u003Ccode>access_token\u003C\u002Fcode>\u003C\u002Ftd>\n    \u003C\u002Ftr>\n  \u003C\u002Ftbody>\n\u003C\u002Ftable>\n\u003Cp>\u003Cspan id=\"IMPLICIT\">\u003C\u002Fspan>\u003C\u002Fp>\n\u003Ch3>OAuth 2.0. Implicit flow\u003C\u002Fh3>\n\u003Ch4>\u003Cstrong>Authorize a user and get a token\u003C\u002Fstrong>\u003C\u002Fh4>\n\u003Col>\n  \u003Cli>Authorize a client with a GET request to the endpoint \u003Ccode>https:\u002F\u002Fonlinesim.io\u002Foauth\u002Fauthorize\u003C\u002Fcode> with parameters \u003Ccode>client_id\u003C\u002Fcode>, \u003Ccode>redirect_uri\u003C\u002Fcode>, \u003Ccode>response_type\u003C\u002Fcode>, \u003Ccode>scope\u003C\u002Fcode>, \u003Ccode>state\u003C\u002Fcode>:\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Ch5>Parameter Description\u003C\u002Fh5>\n\u003Ctable>\n  \u003Cthead>\n    \u003Ctr>\n      \u003Cth>Parameter name\u003C\u002Fth>\n      \u003Cth style=\"text-align:center\">Data type\u003C\u002Fth>\n      \u003Cth>Description\u003C\u002Fth>\n    \u003C\u002Ftr>\n  \u003C\u002Fthead>\n  \u003Ctbody>\n    \u003Ctr>\n      \u003Ctd>client_id\u003C\u002Ftd>\n      \u003Ctd style=\"text-align:center\">STRING\u003C\u002Ftd>\n      \u003Ctd>\u003Ccode>Client ID\u003C\u002Fcode> (returned when the app registration process is complete)\u003C\u002Ftd>\n    \u003C\u002Ftr>\n    \u003Ctr>\n      \u003Ctd>redirect_uri\u003C\u002Ftd>\n      \u003Ctd style=\"text-align:center\">STRING\u003C\u002Ftd>\n      \u003Ctd>Redirect destination for the client after a successful authorization, it must match the \u003Ccode>Redirect URL\u003C\u002Fcode> parameter used during app registration process.\u003C\u002Ftd>\n    \u003C\u002Ftr>\n    \u003Ctr>\n      \u003Ctd>response_type\u003C\u002Ftd>\n      \u003Ctd style=\"text-align:center\">STRING\u003C\u002Ftd>\n      \u003Ctd>Use \u003Ccode>token\u003C\u002Fcode> as a value for Implicit flow\u003C\u002Ftd>\n    \u003C\u002Ftr>\n    \u003Ctr>\n      \u003Ctd>scope\u003C\u002Ftd>\n      \u003Ctd style=\"text-align:center\">STRING\u003C\u002Ftd>\n      \u003Ctd>Access rights that your app asks from the user. Possible values: \u003Ccode>sms-scope\u003C\u002Fcode>, \u003Ccode>rent-scope\u003C\u002Fcode>, \u003Ccode>free-scope\u003C\u002Fcode>. You can specify multiple values\u003C\u002Ftd>\n    \u003C\u002Ftr>\n    \u003Ctr>\n      \u003Ctd>state\u003C\u002Ftd>\n      \u003Ctd style=\"text-align:center\">STRING\u003C\u002Ftd>\n      \u003Ctd>A random string for CSRF protection (verify it after the redirect)\u003C\u002Ftd>\n    \u003C\u002Ftr>\n  \u003C\u002Ftbody>\n\u003C\u002Ftable>\n\u003Col start=\"2\">\n  \u003Cli>After the request to \u003Ccode>https:\u002F\u002Fonlinesim.io\u002Foauth\u002Fauthorize\u003C\u002Fcode> is sent, the user will be redirected from your app to the authorization page to enter the login &amp; password and, if successful, authorize your app to work with user data in the Onlinesim service. To do so, he has to click on \u003Cem>\u003Ccode>Authorize\u003C\u002Fcode>\u003C\u002Fem> button:\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>\u003Cimg src=\"\u002Fopenapi_docs\u002Fdocs\u002FOAuthRequest.png\" alt=\"OAuth request\">\u003C\u002Fp>\n\u003Caside class=\"my-4 rounded-lg border p-4 text-sm leading-relaxed not-prose border-brand-200 bg-brand-50 text-brand-950 theme-dark:text-gray-800\" role=\"note\">\u003Cdiv class=\"openapi-callout-body [&amp;_p:last-child]:mb-0 [&amp;_p]:mb-2\">At this point, you can check the \u003Ccode>state\u003C\u002Fcode>\n parameter, to confirm secure communication with the authorization service\u003C\u002Fdiv>\u003C\u002Faside>\u003Col start=\"3\">\n  \u003Cli>In case of successful authorization, the user will be redirected to the \u003Ccode>redirect_uri\u003C\u002Fcode> address with the parameter \u003Ccode>access_token\u003C\u002Fcode>. This token is required for authorization in Onlinesim API.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Chr>\n\u003Ch3>\u003Cstrong>Authorization of requests to the Onlinesim API\u003C\u002Fstrong>\u003C\u002Fh3>\n\u003Cp>Add to all API requests \u003Cstrong>Authorization: Bearer \u003Cem>\u003Ccode>access_token\u003C\u002Fcode>\u003C\u002Fem>\u003C\u002Fstrong> header.\nIf your request results in \u003Ccode>ERROR_WRONG_KEY\u003C\u002Fcode> (HTTP 456), you should get a new token: the implicit flow gives no refresh token.\u003C\u002Fp>\n\u003Cpre data-lang=\"json\">\u003Ccode class=\"code-hl code-ln\" style=\"--ln-digits:1\">\u003Cspan class=\"line\">\u003Cspan class=\"tok-punct\">{\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">  \u003Cspan class=\"tok-key\">&quot;response&quot;\u003C\u002Fspan>\u003Cspan class=\"tok-punct\">:\u003C\u002Fspan> \u003Cspan class=\"tok-string\">&quot;ERROR_WRONG_KEY&quot;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan class=\"tok-punct\">}\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>","\u003Cspan id=\"OAUTH\">\u003C\u002Fspan>\n### OAuth 2.0\nПротокол OAuth 2.0 поддерживает несколько сценариев авторизации, для работы с нашим API можно использовать сценарии Authorization Code Flow или Implicit Flow.\n\n::: info\nДля получения более подробной информации, пожалуйста, обратитесь к [официальной документации OAuth 2.0](https:\u002F\u002Foauth.net\u002F2\u002F).\n:::\n\n**Authorization URL**: `https:\u002F\u002Fonlinesim.io\u002Foauth\u002Fauthorize`\n\n**Token URL**: `https:\u002F\u002Fonlinesim.io\u002Foauth\u002Ftoken`\n\n**Scopes**:\n\n  - `sms-scope` открывает доступ к управлению номерами для услуги \"Прием SMS\" от Onlinesim;\n  \n  - `rent-scope` открывает доступ к аренде виртуальных телефонных номеров Onlinesim;\n  \n  - `free-scope` открывает доступ к использованию бесплатных номеров Onlinesim.\n\nScope проверяется только там, где он нужен методу: `sms-scope` — getTariffs и getNumbersStats, `rent-scope` — методы аренды, `free-scope` — getFreeList. Остальные методы принимают любой действующий токен. Токен, выданный без `scope`, получает `sms-scope`.\n\nAccess token живёт 2 месяца, refresh token — 4 месяца (`expires_in` в ответе с токеном — в секундах).\n\n### **Регистрация вашего приложения на нашем сервисе авторизации**\n\n1. Перейдите на [страницу OAuth](https:\u002F\u002Fonlinesim.io\u002Foauth)\n2. Создайте новый клиент, указав:\n      * `Name` - название приложения или любое другое название, которое Вы и Ваши пользователи будут ассоциировать с приложением;\n      * `Redirect URL` - URL, на который будет перенаправлен клиент после авторизации и куда будет направлен код авторизации приложения;\n      * `Confidential` - необзятально, отметье клиент как *Confidential*, если ваше приложение работает на сервере и может безопасно хранить *Client Secret*.\n\n![Создание клиента](\u002Fdocs\u002FCreateOAuthClient.png)\n\n3. Нажмите \"Create\". Добавленное Вами приложение будет отображаться в списке клиентов.\n\n![Список клиентов](\u002Fdocs\u002FOAuthClient.png)\n\n4. Сохраните `Client ID` и `Secret` в безопасном месте, далее они будут использоваться Вашим приложении для авторизации.\n\n\u003Cspan id=\"AUTHCODE\">\u003C\u002Fspan>\n### OAuth 2.0. Authorization Сode Flow\n\n#### **Авторизация пользователя и получение токена**\n\n1. Авторизуйте клиент через GET запрос к `https:\u002F\u002Fonlinesim.io\u002Foauth\u002Fauthorize` с параметрами `client_id`, `redirect_uri`, `response_type`, `scope`, `state`:\n\n##### Описание параметров\n\n  Название параметра | Тип данных | Описание\n  -------------------|:----------:|---------\n  client_id | STRING | `Client ID`, который был получен после регистрации приложения\n  redirect_uri | STRING | Адрес на который будет перенаправлен клиент, после успешной авторизации, должен совпадать с `Redirect URL`, который Вы указали при регистрации приложения.\n  response_type | STRING | Указать `code`\n  scope | STRING | Права доступа, разрешение на которые запрашивает Ваше приложение у пользователя. Возможные варианты: `sms-scope`, `rent-scope`, `free-scope`. Можно указать несколько значений\n  state | STRING | Случайная строка для защиты от CSRF (проверьте её после редиректа)\n  code_challenge | STRING | Обязателен для клиента без отметки Confidential (PKCE): BASE64URL(SHA256(`code_verifier`))\n  code_challenge_method | STRING | `S256`\n\n2. После запроса к `https:\u002F\u002Fonlinesim.io\u002Foauth\u002Fauthorize` пользователь из Вашего приложения будет перенаправлен на страницу авторизации, где ему необходимо указать логин пароль и, в случае успеха, авторизовать Ваше приложение для работы с данными пользователя в сервисе Onlinesim. Для этого ему необходимо будет нажать кнопку *`Authorize`*:\n\n![OAuth запрос](\u002Fdocs\u002FOAuthRequest.png)\n\n::: info\nНа этом этапе Вы можете проверить параметр `state`, для подтверждения безопасного взаимодействия с сервисом авторизации\n:::\n\n3. В случае успешной авторизации пользователь будет перенаправлен по адресу `redirect_uri` с параметром `code`. Теперь Вы можете получить `access token`, для этого необходимо сделать POST запрос к `https:\u002F\u002Fonlinesim.io\u002Foauth\u002Ftoken`:\n\n##### Описание параметров\n\n  Название параметра | Тип данных | Описание\n  ---------|:--------:|---------\n  grant_type | STRING | Сценарий авторизации, для сценария Authorization Сode необходимо указать `authorization_code`\n  client_id | STRING | `Client ID`, который был получен после регистрации приложения\n  client_secret | STRING |`Сlient_secret`, который был получен после регистрации приложения\n  redirect_uri | STRING | Адрес на который будет перенаправлен клиент, после успешной авторизации, должен совпадать с `Redirect URL`, который Вы указали при регистрации приложения\n  code | STRING | Код авторизации, который был получен на предыдущем этапе\n  code_verifier | STRING | Случайная строка, из которой сделан `code_challenge` (клиенты без отметки Confidential)\n\n\n::: danger\n  \nТак как `client_secret` -  это приватный ключ, его крайне не рекомендуется хранить на frontend клиента. Для большей безопасности необходимо хранить его в бэкенде Вашего приложения. Для реализации сценария с авторизационным кодом нужно передать полученный frontend'ем код в backend Вашего сервиса, а уже он должен обратится в авторизационный сервис для получения токена.\n:::\n\n4. В результате успешного выполнения запроса к `https:\u002F\u002Fonlinesim.io\u002Foauth\u002Ftoken`, в ответ получите JSON, содержащий поля `access_token`, `refresh_token` и `expires_in`. Поле `expires_in` определяет количество секунд до истечения срока действия токена доступа, `refresh_token` используется для обновления токена доступа при истечении его срока действия.\n\n---\n\n#### **Авторизация запросов к API Onlinesim и обновление токена**\n\nВо все запросы к API нужно добавлять заголовок **Authorization: Bearer *`access_token`***.\nЕсли в ответ на ваш запрос пришел `ERROR_WRONG_KEY` (HTTP 456), Вам необходимо обновить токен или получить новый.\n\n  ```json\n  {\n    \"response\": \"ERROR_WRONG_KEY\"\n  }\n  ```\n\nДля обновления токена необходимо сделать POST запрос к `https:\u002F\u002Fonlinesim.io\u002Foauth\u002Ftoken` с параметрами `grant_type`, `client_id`, `client_secret` и `refresh_token`. Для поля `refresh_token` необходимо использовать значение, которое было получено в шаге 4.\n\n##### Описание параметров\n\n  Название параметра | Тип данных | Описание\n  ---------|:--------:|---------\n  grant_type | STRING | Необходимо указать `refresh_token`\n  client_id | STRING | `client ID`, который Вы получили при регистрации приложения\n  client_secret | STRING | `client_secret`, который был получен при регистрации приложения\n  refresh_token | STRING | `refresh_token` был получен вместе с `access_token`. Имеет гораздо большее время жизни и используется для обновления `access_token`\n\n\n\u003Cspan id=\"IMPLICIT\">\u003C\u002Fspan>\n### OAuth 2.0. Implicit flow\n\n#### **Авторизация пользователя и получение токена**\n1. Авторизуйте клиент через GET запрос к `https:\u002F\u002Fonlinesim.io\u002Foauth\u002Fauthorize` с параметрами `client_id`, `redirect_uri`, `response_type`, `scope`, `state`:\n\n##### Описание параметров\n\n  Название параметра | Тип данных | Описание\n  ---------|:--------:|---------\n  client_id | STRING | `Client ID`, который был получен при регистрации приложения\n  redirect_uri | STRING | Адрес на который будет перенаправлен клиент, после успешной авторизации, должен совпадать с `Redirect URL`, который Вы указали при добавлении приложения.\n  response_type | STRING | Используйте `token` в качестве значения\n  scope | STRING | Права доступа, разрешение на которые запрашивает Ваше приложение у пользователя. Возможные варианты: `sms-scope`, `rent-scope`, `free-scope`. Можно указать несколько значений\n  state | STRING | Случайная строка для защиты от CSRF (проверьте её после редиректа)\n\n2. После запроса к `https:\u002F\u002Fonlinesim.io\u002Foauth\u002Fauthorize`, пользователь из Вашего приложения будет перенаправлен на страницу авторизации, где ему необходимо указать логин пароль и, в случае успеха, авторизовать Ваше приложение для работы с данными пользователя в сервисе Onlinesim. Для этого ему необходимо будет нажать кнопку *`Authorize`*:\n\n![OAuth запрос](\u002Fdocs\u002FOAuthRequest.png)\n\n::: info\nНа этом этапе Вы можете проверить параметр `state`, для подтверждения безопасного взаимодействия с сервисом авторизации\n:::\n\n3. В случае успешной авторизации пользователь будет перенаправлен по адрес `redirect_uri` с параметром `access_token`. Это и есть необходимый токен для авторизации в API Onlinesim.\n\n---\n\n### **Авторизация запросов к API Onlinesim**\n\nВо все запросы к API нужно добавлять заголовок **Authorization: Bearer *`access_token`***.\nЕсли в ответ на ваш запрос пришел `ERROR_WRONG_KEY` (HTTP 456), Вам необходимо получить новый токен: Implicit flow не выдаёт refresh token.\n\n  ```json\n  {\n    \"response\": \"ERROR_WRONG_KEY\"\n  }\n  ```\n","\u003Cspan id=\"OAUTH\">\u003C\u002Fspan>\n### OAuth 2.0\nDas OAuth 2.0-Protokoll unterstützt mehrere Autorisierungsszenarien. Für die Arbeit mit unserer API können Sie die Szenarien Authorization Code Flow oder Implicit Flow verwenden.\n\n::: info\nFür weitere Informationen wenden Sie sich bitte an die [offizielle OAuth 2.0-Dokumentation](https:\u002F\u002Foauth.net\u002F2\u002F).\n:::\n\n**Authorization URL**: `https:\u002F\u002Fonlinesim.io\u002Foauth\u002Fauthorize`\n\n**Token URL**: `https:\u002F\u002Fonlinesim.io\u002Foauth\u002Ftoken`\n\n**Scopes**:\n\n  - `sms-scope` gewährt Zugriff auf die Verwaltung von Nummern für den Dienst \"SMS-Empfang\" von Onlinesim;\n  \n  - `rent-scope` gewährt Zugriff auf die Vermietung virtueller Telefonnummern von Onlinesim;\n  \n  - `free-scope` gewährt Zugriff auf die Verwendung kostenloser Nummern von Onlinesim.\n\nEin Scope wird nur dort geprüft, wo die Methode ihn braucht: `sms-scope` — getTariffs und getNumbersStats, `rent-scope` — die Mietmethoden, `free-scope` — getFreeList. Die übrigen Methoden akzeptieren jedes gültige Token. Ein ohne `scope` ausgestelltes Token erhält `sms-scope`.\n\nEin Access Token gilt 2 Monate, ein Refresh Token 4 Monate (`expires_in` in der Token-Antwort ist in Sekunden).\n\n### **Registrierung Ihrer Anwendung auf unserem Autorisierungsdienst**\n\n1. Gehen Sie zur [OAuth-Seite](https:\u002F\u002Fonlinesim.io\u002Foauth)\n2. Erstellen Sie einen neuen Client und geben Sie an:\n      * `Name` - Name der Anwendung oder ein anderer Name, den Sie und Ihre Benutzer mit der Anwendung assoziieren werden;\n      * `Redirect URL` - URL, an die der Client nach der Autorisierung weitergeleitet wird und wohin der Autorisierungscode der Anwendung gesendet wird;\n      * `Confidential` - optional, markieren Sie den Client als *Confidential*, wenn Ihre Anwendung auf einem Server läuft und den *Client Secret* sicher speichern kann.\n\n![Client erstellen](\u002Fdocs\u002FCreateOAuthClient.png)\n\n3. Klicken Sie auf \"Create\". Ihre hinzugefügte Anwendung wird in der Liste der Clients angezeigt.\n\n![Client-Liste](\u002Fdocs\u002FOAuthClient.png)\n\n4. Speichern Sie `Client ID` und `Secret` an einem sicheren Ort, sie werden von Ihrer Anwendung für die Autorisierung verwendet.\n\n\u003Cspan id=\"AUTHCODE\">\u003C\u002Fspan>\n### OAuth 2.0. Authorization Code Flow\n\n#### **Benutzerautorisierung und Token-Erhaltung**\n\n1. Autorisieren Sie den Client über eine GET-Anfrage an `https:\u002F\u002Fonlinesim.io\u002Foauth\u002Fauthorize` mit den Parametern `client_id`, `redirect_uri`, `response_type`, `scope`, `state`:\n\n##### Parameterbeschreibung\n\n  Parametername | Datentyp | Beschreibung\n  -------------------|:----------:|---------\n  client_id | STRING | `Client ID`, der nach der Registrierung der Anwendung erhalten wurde\n  redirect_uri | STRING | Adresse, an die der Client nach erfolgreicher Autorisierung weitergeleitet wird, muss mit der `Redirect URL` übereinstimmen, die Sie bei der Registrierung der Anwendung angegeben haben.\n  response_type | STRING | Geben Sie `code` an\n  scope | STRING | Zugriffsrechte, deren Genehmigung Ihre Anwendung vom Benutzer anfordert. Mögliche Optionen: `sms-scope`, `rent-scope`, `free-scope`. Mehrere Werte können angegeben werden\n  state | STRING | Zufällige Zeichenfolge zum Schutz vor CSRF (überprüfen Sie sie nach der Weiterleitung)\n  code_challenge | STRING | Pflicht für einen nicht als Confidential markierten Client (PKCE): BASE64URL(SHA256(`code_verifier`))\n  code_challenge_method | STRING | `S256`\n\n2. Nach der Anfrage an `https:\u002F\u002Fonlinesim.io\u002Foauth\u002Fauthorize` wird der Benutzer aus Ihrer Anwendung zur Autorisierungsseite weitergeleitet, wo er Benutzername und Passwort eingeben muss und bei Erfolg Ihre Anwendung für die Arbeit mit den Benutzerdaten im Onlinesim-Dienst autorisieren muss. Dazu muss er auf die Schaltfläche *`Authorize`* klicken:\n\n![OAuth-Anfrage](\u002Fdocs\u002FOAuthRequest.png)\n\n::: info\nAuf dieser Stufe können Sie den Parameter `state` überprüfen, um die sichere Interaktion mit dem Autorisierungsdienst zu bestätigen\n:::\n\n3. Bei erfolgreicher Autorisierung wird der Benutzer an die Adresse `redirect_uri` mit dem Parameter `code` weitergeleitet. Jetzt können Sie ein `access token` erhalten, dazu müssen Sie eine POST-Anfrage an `https:\u002F\u002Fonlinesim.io\u002Foauth\u002Ftoken` stellen:\n\n##### Parameterbeschreibung\n\n  Parametername | Datentyp | Beschreibung\n  ---------|:--------:|---------\n  grant_type | STRING | Autorisierungsszenario, für das Szenario Authorization Code müssen Sie `authorization_code` angeben\n  client_id | STRING | `Client ID`, der nach der Registrierung der Anwendung erhalten wurde\n  client_secret | STRING |`Client_secret`, der nach der Registrierung der Anwendung erhalten wurde\n  redirect_uri | STRING | Adresse, an die der Client nach erfolgreicher Autorisierung weitergeleitet wird, muss mit der `Redirect URL` übereinstimmen, die Sie bei der Registrierung der Anwendung angegeben haben\n  code | STRING | Autorisierungscode, der in der vorherigen Stufe erhalten wurde\n  code_verifier | STRING | Die Zufallszeichenfolge, aus der `code_challenge` erzeugt wurde (nicht als Confidential markierte Clients)\n\n::: danger\n\nDa `client_secret` ein privater Schlüssel ist, wird nicht empfohlen, ihn im Frontend des Clients zu speichern. Für mehr Sicherheit muss er im Backend Ihrer Anwendung gespeichert werden. Um das Szenario mit dem Autorisierungscode zu implementieren, muss der vom Frontend erhaltene Code an das Backend Ihres Dienstes übergeben werden, und dieses muss sich dann an den Autorisierungsdienst wenden, um das Token zu erhalten.\n:::\n\n4. Als Ergebnis einer erfolgreichen Anfrage an `https:\u002F\u002Fonlinesim.io\u002Foauth\u002Ftoken` erhalten Sie eine JSON-Antwort, die die Felder `access_token`, `refresh_token` und `expires_in` enthält. Das Feld `expires_in` bestimmt die Anzahl der Sekunden bis zum Ablauf des Zugriffstokens, `refresh_token` wird verwendet, um das Zugriffstoken bei Ablauf zu aktualisieren.\n\n---\n\n#### **Autorisierung von Anfragen an die Onlinesim API und Token-Aktualisierung**\n\nZu allen Anfragen an die API muss der Header **Authorization: Bearer *`access_token`*** hinzugefügt werden.\nWenn als Antwort auf Ihre Anfrage `ERROR_WRONG_KEY` (HTTP 456) kam, müssen Sie das Token aktualisieren oder ein neues erhalten.\n\n  ```json\n  {\n    \"response\": \"ERROR_WRONG_KEY\"\n  }\n  ```\n\nUm das Token zu aktualisieren, müssen Sie eine POST-Anfrage an `https:\u002F\u002Fonlinesim.io\u002Foauth\u002Ftoken` mit den Parametern `grant_type`, `client_id`, `client_secret` und `refresh_token` stellen. Für das Feld `refresh_token` muss der Wert verwendet werden, der in Schritt 4 erhalten wurde.\n\n##### Parameterbeschreibung\n\n  Parametername | Datentyp | Beschreibung\n  ---------|:--------:|---------\n  grant_type | STRING | Sie müssen `refresh_token` angeben\n  client_id | STRING | `client ID`, den Sie bei der Registrierung der Anwendung erhalten haben\n  client_secret | STRING | `client_secret`, der bei der Registrierung der Anwendung erhalten wurde\n  refresh_token | STRING | `refresh_token` wurde zusammen mit `access_token` erhalten. Hat eine viel längere Lebensdauer und wird verwendet, um `access_token` zu aktualisieren\n\n\n\u003Cspan id=\"IMPLICIT\">\u003C\u002Fspan>\n### OAuth 2.0. Implicit Flow\n\n#### **Benutzerautorisierung und Token-Erhaltung**\n1. Autorisieren Sie den Client über eine GET-Anfrage an `https:\u002F\u002Fonlinesim.io\u002Foauth\u002Fauthorize` mit den Parametern `client_id`, `redirect_uri`, `response_type`, `scope`, `state`:\n\n##### Parameterbeschreibung\n\n  Parametername | Datentyp | Beschreibung\n  ---------|:--------:|---------\n  client_id | STRING | `Client ID`, der bei der Registrierung der Anwendung erhalten wurde\n  redirect_uri | STRING | Adresse, an die der Client nach erfolgreicher Autorisierung weitergeleitet wird, muss mit der `Redirect URL` übereinstimmen, die Sie beim Hinzufügen der Anwendung angegeben haben.\n  response_type | STRING | Verwenden Sie `token` als Wert\n  scope | STRING | Zugriffsrechte, deren Genehmigung Ihre Anwendung vom Benutzer anfordert. Mögliche Optionen: `sms-scope`, `rent-scope`, `free-scope`. Mehrere Werte können angegeben werden\n  state | STRING | Zufällige Zeichenfolge zum Schutz vor CSRF (überprüfen Sie sie nach der Weiterleitung)\n\n2. Nach der Anfrage an `https:\u002F\u002Fonlinesim.io\u002Foauth\u002Fauthorize` wird der Benutzer aus Ihrer Anwendung zur Autorisierungsseite weitergeleitet, wo er Benutzername und Passwort eingeben muss und bei Erfolg Ihre Anwendung für die Arbeit mit den Benutzerdaten im Onlinesim-Dienst autorisieren muss. Dazu muss er auf die Schaltfläche *`Authorize`* klicken:\n\n![OAuth-Anfrage](\u002Fdocs\u002FOAuthRequest.png)\n\n::: info\nAuf dieser Stufe können Sie den Parameter `state` überprüfen, um die sichere Interaktion mit dem Autorisierungsdienst zu bestätigen\n:::\n\n3. Bei erfolgreicher Autorisierung wird der Benutzer an die Adresse `redirect_uri` mit dem Parameter `access_token` weitergeleitet. Dies ist das erforderliche Token für die Autorisierung in der Onlinesim API.\n\n---\n\n### **Autorisierung von Anfragen an die Onlinesim API**\n\nZu allen Anfragen an die API muss der Header **Authorization: Bearer *`access_token`*** hinzugefügt werden.\nWenn als Antwort auf Ihre Anfrage `ERROR_WRONG_KEY` (HTTP 456) kam, müssen Sie ein neues Token erhalten: der Implicit Flow liefert kein Refresh Token.\n\n  ```json\n  {\n    \"response\": \"ERROR_WRONG_KEY\"\n  }\n  ```\n",{"implicit":437,"authorizationCode":443},{"authorizationUrl":438,"scopes":439},"https:\u002F\u002Fonlinesim.io\u002Foauth\u002Fauthorize",{"sms-scope":440,"rent-scope":441,"free-scope":442},"grants access to manage numbers for the SMS receiving service from Onlinesim","grants access to renting phone numbers from Onlinesim","grants access to using Onlinesim free numbers",{"authorizationUrl":438,"tokenUrl":444,"refreshUrl":444,"scopes":445},"https:\u002F\u002Fonlinesim.io\u002Foauth\u002Ftoken",{"sms-scope":440,"rent-scope":441,"free-scope":442},{"parameters":447,"requestBody":451,"responses":474},[448],{"name":188,"in":189,"description":190,"x-description-ru":191,"x-description-de":192,"required":55,"schema":449},{"type":194,"enum":450,"example":5},[196,37,36,5,197],{"required":199,"content":452},{"application\u002Fjson":453},{"schema":454},{"required":455,"properties":456,"type":258},[54],{"profile":457},{"description":206,"x-description-ru":207,"x-description-de":208,"properties":458,"type":258},{"webhook_url":459,"number_country":461,"number_reject":462,"name":468,"username":469,"email":470,"password":471,"password_confirmation":472,"old_password":473},{"description":211,"x-description-ru":212,"x-description-de":213,"type":460,"format":216,"example":217},[194,215],{"description":219,"x-description-ru":220,"x-description-de":221,"type":222,"example":223},{"description":225,"x-description-ru":226,"x-description-de":227,"oneOf":463},[464,466],{"type":230,"items":465},{"type":194},{"type":194,"enum":467},[215],{"description":235,"x-description-ru":236,"x-description-de":237,"type":194},{"description":239,"x-description-ru":240,"x-description-de":241,"type":194},{"description":243,"x-description-ru":244,"x-description-de":245,"type":194},{"description":247,"x-description-ru":248,"x-description-de":249,"type":194},{"description":251,"x-description-ru":252,"x-description-de":253,"type":194},{"description":255,"x-description-ru":256,"x-description-de":257,"type":194},{"200":475,"429":551,"456":561},{"description":261,"x-description-ru":262,"x-description-de":263,"content":476},{"application\u002Fjson":477},{"schema":478,"examples":544},{"oneOf":479},[480,531,535,540],{"required":481,"properties":482,"type":258},[270,271],{"response":483,"user":485},{"type":194,"enum":484,"example":275},[275],{"description":277,"x-description-ru":278,"x-description-de":279,"properties":486,"type":258},{"id":487,"hash_id":488,"name":490,"username":492,"email":494,"email_verified_at":496,"apikey":498,"api_access":499,"locale":504,"currency":505,"number_country":506,"number_reject":508,"number_region":514,"webhook_url":516,"number":518,"country":520,"is_api":522,"active":523,"block":524,"disable":525,"verify":526,"ugroup":527,"first_login":528,"is_project_subscription":529,"created_at":530},{"type":222,"example":282},{"type":489},[194,215],{"type":491,"example":287},[194,215],{"type":493},[194,215],{"type":495,"example":292},[194,215],{"type":497},[194,215],{"type":194},{"description":297,"x-description-ru":298,"x-description-de":299,"oneOf":500},[501,502],{"type":302},{"type":258,"additionalProperties":503},{"type":194},{"type":194,"example":5},{"type":194,"example":307},{"description":219,"x-description-ru":220,"x-description-de":221,"type":507,"example":223},[222,215],{"description":311,"x-description-ru":312,"x-description-de":313,"oneOf":509},[510,512,513],{"type":230,"items":511},{"type":194},{"type":258},{"type":215},{"description":320,"x-description-ru":321,"x-description-de":322,"type":515},[222,215],{"description":325,"x-description-ru":326,"x-description-de":327,"type":517},[194,215],{"type":519},[222,215],{"type":521},[194,215],{"type":302},{"type":194},{"type":222},{"type":302},{"type":222},{"type":222},{"type":302},{"type":302},{"type":194},{"description":343,"x-description-ru":344,"x-description-de":345,"required":532,"properties":533,"type":258},[270],{"response":534},{"type":258,"additionalProperties":199},{"required":536,"properties":537,"type":258},[270],{"response":538},{"type":194,"enum":539},[354,355],{"required":541,"properties":542,"type":258,"additionalProperties":199},[270],{"response":543},{"description":360,"x-description-ru":361,"x-description-de":362,"type":194},{"Validation error":545,"ERROR_PARAMS":549},{"summary":365,"x-summary-ru":366,"x-summary-de":367,"value":546},{"response":547},{"webhook_url":548},[371],{"summary":373,"x-summary-ru":374,"x-summary-de":375,"value":550},{"response":354},{"description":378,"x-description-ru":379,"x-description-de":380,"content":552},{"application\u002Fjson":553},{"schema":554,"examples":558},{"required":555,"properties":556,"type":258,"additionalProperties":199},[270],{"response":557},{"description":360,"x-description-ru":361,"x-description-de":362,"type":194},{"Rate limit":559},{"summary":389,"x-summary-ru":390,"x-summary-de":391,"value":560},{"response":393},{"description":395,"x-description-ru":396,"x-description-de":397,"content":562},{"application\u002Fjson":563},{"schema":564,"examples":568},{"required":565,"properties":566,"type":258,"additionalProperties":199},[270],{"response":567},{"description":360,"x-description-ru":361,"x-description-de":362,"type":194},{"Invalid key":569},{"summary":406,"x-summary-ru":407,"x-summary-de":408,"value":570},{"response":410},{"operationKey":175,"method":176,"urlPath":72,"isWebhook":55,"isInboundWebhook":55,"servers":572,"availableAuthMethods":576,"apiKeyAuth":577,"oauthConfigs":578,"prepared":590,"locale":5,"specName":8,"path":70},[573],{"url":574,"description":575},"https:\u002F\u002Fonlinesim.io","Onlinesim server",[424,430,432],{"in":189,"name":424},[579,585],{"schemeName":580,"flowType":581,"flow":582,"authorizationUrl":438,"tokenUrl":444,"refreshUrl":444,"scopes":584},"OAuth2","authorizationCode",{"authorizationUrl":438,"tokenUrl":444,"refreshUrl":444,"scopes":583},{"sms-scope":440,"rent-scope":441,"free-scope":442},{"sms-scope":440,"rent-scope":441,"free-scope":442},{"schemeName":580,"flowType":586,"flow":587,"authorizationUrl":438,"scopes":589},"implicit",{"authorizationUrl":438,"scopes":588},{"sms-scope":440,"rent-scope":441,"free-scope":442},{"sms-scope":440,"rent-scope":441,"free-scope":442},{"codeParams":591,"requestBody":598},{"method":176,"url":72,"baseUrl":574,"contentType":592,"params":593},"application\u002Fjson",[594,595],{"in":189,"name":188,"value":5,"type":194,"required":55},{"in":596,"name":54,"value":597,"type":258,"required":199},"body","file.jpg",{"required":199,"contentTypes":599,"activeContentType":592,"byContentType":600},[592],{"application\u002Fjson":601},{},1795170423677]