"100001005 : Please log in first" with CURL POST Method

Hi,

GET works with CURL:
$method = “GET”
$url = (“https://www.binance.com/bapi/futures/v1/friendly/future/copy-trade/lead-portfolio/detail?$url_params&timestamp=$timestamp&recvWindow=5000&signature=$signature").replace(“?&”,"?”)

But POST throws the login error:
$method = “POST”
$url = (“https://www.binance.com/bapi/futures/v1/private/future/order/open-orders?$url_params&timestamp=$timestamp&recvWindow=5000&signature=$signature").replace(“?&”,"?”)

I am using Binance API-Keys and signatures, no problem with GETs as said. Any idea? Thank you! Marcel

Hey,
You are using an endpoint used by browsers. There may be argument missing that are used by browsers (e.g.: csrf token)
If you intend to create an order, I recommend using the API specified in the documentation: Binance API Documentation

Thank you, yes indeed.
Is it possible to get a csrftoken via REST, and additionally read the browser p20t cookie in order to create a real websession, and thus use the bapi commands? Thx.

I am sorry but I don’t think it is possible to generate a csrftoken or use the bapi via REST as it is not an official endpoint.