O
O
OlexAd2020-09-18 16:03:09
RESTful API
OlexAd, 2020-09-18 16:03:09

Bitrix24 REST API (Local Application), how to request data on behalf of a specific user?

Added a local application to Bitrix24 with permissions for tasks, etc.
5f64abe02494e356661429.png
Bitrix rest api has two methods for getting task data task.item.getdata (outdated) and tasks.task.get . When you try to request data on a task, for the most part the answer comes like this: the task was not found or there is no access

Task not found or accessible; 1/TE/TASK_NOT_FOUND_OR_NOT_ACCESSIBLE
in call [task.item.getdata] for domain [domain.bitrix24.kz]

And sometimes the data comes in fine.

There is definitely a task, the application has been granted rights, both for tasks and extended ones (tasks_extended).
I didn’t immediately understand why this was happening, but then I checked the access rights to the task using the getaccess method , access from the current user is checked by default. By trial, I found out that the data is requested every time from a random user.
I couldn't find any information on how to change this in the documentation. For some reason, I thought the data would be requested in accordance with the rights granted to the application, or on behalf of the one who added the application.

How can I fix the user on whose behalf the application is requesting data?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yuri Paimurzin, 2020-09-18
@OlexAd

the fastest and easiest way how to request on behalf of a user is to log in as this user and create a webhook, then the webhook will be executed on his behalf and with his rights

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question