1b.app
Link copied -

Can't connect to API2

Hello, OneBox team!
I am an administrator in my OneBox OS account
We are trying to connect the system to an external tool via API v2 and use the token acquisition method:
curl -s -X POST "https://mybox.1b.app/api/v2/token/get/" \
-H "Content-Type: application/json" \
--data '{"login":"mylogin","password":"myresetpassword"}'
However, the server keeps returning:
{"status":0,"errorArray":["Not permisson"]}
In this case:
The user has the Administrator role;
REST API password generated and valid;
API v2 application installed;
Nothing is configured in the API v2 settings, namely:
Authorization settings by phone number - no check marks
Other application settings - no checkboxes
Configure access to methods - nothing selected
Questions:
What else needs to be enabled/issued in the rights so that the /api/v2/token/get/ method correctly returns the token?
Is it necessary to additionally allow this method in the API v2 settings (list of accesses to endpoints)?
Can you send a working example of a curl request with a login and REST API password that should definitely work?
We need to download processes, contacts and settings via API, and without a token access is not opened.
Original question is available on version: ru

Answers:


Matvey писал/а:
'{"login":"mylogin","password":"myresetpassword"}'

https://swagger.1b.app/#/token/post_api_v2_token_get_

{
"login": "mylogin",
"restapipassword": "48e645317c3ef768387c4e9ad93c1c6d"
}

password->restapipassword
вчера, 16:11

Please join the conversation. If you have something to say - please write a comment. You will need a mobile phone and an SMS code for identification to enter. Log in and comment