1b.app
Link copied -

Deals are not created when requested via API

There are cases when, when requesting via the API using the - api/orders/add/ method, the server gives the following response:
{"result":"fail","errors":["Not enough licenses!"],"errorText":false}
The essence of the error, Not enough licenses! . How can I fix this and what is causing the error?
Original question is available on version: ru

Answers:

Good afternoon. To use api, you need authorization (you send a login and password), to authorize a user, you must have free licenses in onebox, you obviously do not have them. The number of licenses can be viewed at the link: yourbox/app/employer/online/
28.04.2023, 14:30
Original comment available on version: ru

Машталяр Анастасия Викторовна
Leave a message in this thread and the user's contacts will be shown to you
what if you use the api of a user who is permanently authorized?
28.04.2023, 14:37
Original comment available on version: ru

If your api user is always authorized and has a license, then you can make requests from him and there will be no such error.
We can also make a request for an api token 1 time, at this moment the license will be checked, if the token has already been created and you continue to make requests on it, then its validity period will be extended.
If the token is not requested for 1 hour, it becomes invalid.
28.04.2023, 15:01
Original comment available on version: ua


Mashtalyar Anastasia Viktorovna wrote:
If you do not make a request for a token for 1 hour, then it becomes irrelevant.

apishki not beguiled?

Mashtalyar Anastasia Viktorovna wrote:
what if you use the api of a user who is permanently authorized?

in this case, the user who is authorized will be thrown out of the box from time to time (after each api request).
28.04.2023, 15:50
Original comment available on version: ru

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