How can I find my Bitrix24 Access API Parameters?
Here are the access parameters you need to connect Bitrix24 with API2Task:
type – Bitrix24
url – TMS URL
access_token – your Bitrix24 access_token API REST with scopes "calendar, disk, telephony, crm, im, user, entity, task, tasks_extended, bizproc, mailservice, log, sonet_group, department"
refresh_token – your Bitrix24 refresh_token API REST
To obtain access_token and refresh_token:
- A Bitrix24 application uses client_id to get the value of code, which is imperative to get the authorization token. A user opens the following address in a browser: intranet_name - it is a name of your Bitrix24 network. The browser will now redirect to the application URL passing the first authentication code (the code).
- The application uses clent_id, client_secret and code to get the values of access_code and refresh_token.The application sends a request:
The server will reply with a JSON string like:
- The application uses access_code to send REST requests until the access code is expired.
- access_code will expire in an hour. The application can then use refresh_token to get a new access_code.
- If refresh_token is still valid (was obtained less than a month ago), the application gets new valid access_code and refresh_token and proceeds to the step 3.
- If, however, refresh_token has expired, a user will have to authenticate again manually next time a REST request is going to be sent out.
Posted in: Getting Started