Авторизация
POST http://{idcrm}-crm-api.vionvi.com/oauth/token
Параметры запроса
Параметр | Тип данных | Описание |
---|---|---|
client_id | string | ID интеграции (Выдаётся разработчику по запросу) |
client_secret | string | Секретный ключ интеграции |
grant_type | string | Тип авторизационных данных (password) |
username | string | Логин (Email) аккаунта администратора CRM |
password | string | Пароль от аккаунта администратора CRM |
Пример запроса:
POST /oauth/token HTTP/1.1
Host: 1-crm-api.vionvi.com
Accept: application/json
Content-Type: application/json
Content-Length: 182
{
"client_id": "xxxxxx",
"client_secret": "xjkfkgjhdfkjhvkdjfhkjvfkjdvfdvfdv",
"grant_type": "xxxxxxxxxx",
"username": "xxxxxxxxxxx",
"password": "xxxxxxxxx"
}
Параметры ответа
Параметр | Тип данных | Описание | |
---|---|---|---|
token_type | string |
| |
expires_in | int |
| |
access_token | string | Access Token | |
refresh_token | string |
|
Пример ответа:
HTTP/1.1200 OK
Server: nginx/1.21.6
Content-Type: application/json; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
X-Powered-By: PHP/8.1.3
pragma: no-cache
Cache-Control: no-store, private
Date: Tue, 26 Jul 2022 10:29:13 GMT
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 57
Access-Control-Allow-Origin: *
{
"token_type":"Bearer",
"expires_in":31536000,
"access_token":"1NiJ9.eyJhdWQiOiIyIiwianRpIjoiMThjmMyOGE5YzM2OW",
"refresh_token":"def502001d1c2856c5fcfc83e1b51"
}