1b.app
Link copied -

api/v2/token/get/ CORS error

Возникают сложности в работе API компонента?
Рекомендуем обратиться к партнерам-интеграторам за консультацией - они помогут решить задачу в настройке! Посмотреть список партнеров
Ask
https://inox-trade.1b.app/api/v2/token/get/?login=restapi&restapipassword=8e...
through the browser line (as in the video) you see:
{"status":1,"dataArray":{"token":"1dcc844972702b9f2dd0b22888b0f286"}}
Tobto all harazd.
Code on the site https://inox-trade.com.ua (jquery quiz):
$.get("https://inox-trade.1b.app/api/v2/token/get/?login=restapi&restapipassword=8e... function (data) {
console log(data);
});
Error: "CORS error"
On the basis of my knowledge, the fence of the https://inox-trade.1b.app server is valid for requests from other domains.
De i yak it is possible to set an option for: https://inox-trade.com.ua ?
Original question is available on version: ru

Answers:

Good afternoon. I understand correctly that you are in the js script sewing up your login and password from boxing, thereby showing your login and password to the whole world?
30.06.2022, 12:12
Original comment available on version: ru


anonymous hamster
OneBox production wrote:
On the basis of my knowledge, the fence of the https://inox-trade.1b.app server is valid for requests from other domains.
De i yak it is possible to set an option for: https://inox-trade.com.ua ?

about this no, the error occurs on the side of the sender of the request and not the recipient. Read on the Internet about the error that is shown in the console, the reasons for which it occurs will be written there.
But in any case, I do not advise you to make any requests from javascript directly to the box api, since your box will then be hacked by any student and will sit under your account and can do any trouble. Similar requests need to be made to yourself on the back-end, where you already receive the necessary information via api from the box and from the back-end transmit to the front with the same api requests only to your own server.
30.06.2022, 12:17
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