How to use testnet.binance.vision for spot trading?

Access to fetch at ‘https://testnet.binance.vision/api/v3/account?recvWindow=50000&timestamp=1631534601651&signature=1fb64cba0c0507f472197e573c60652062bc5a2d80d915902c15e4623d81ab9e’ from origin ‘http://localhost:3000’ has been blocked by CORS policy: Request header field x-mbx-apikey is not allowed by Access-Control-Allow-Headers in preflight response.

I am trying to get account info from my spot testnet account. But I got this error.
Can you help me? If you have ever faced at the same issue, help me please.

This happens when browsers are involved due to higher security standard, using Postman won’t have this issue.
Browser sends OPTIONS as preflight request to the API before sending the actual GET request, so you can try to add OPTIONS into “Access-Control-Allow-Methods” (and maybe also X-MBX-APIKEY to "Access-Control-Allow-Headers:)

Thanks for your help.
Sorry but could you please explain in more detail with example?

This is not an actual Binance API issue, please refer to online resources :slight_smile::
For example, this one might be helpful: https://stackoverflow.com/questions/42061727/cors-error-request-header-field-authorization-is-not-allowed-by-access-control

Thanks for your kind answer. But I didnt fix that problem yet. Could you please let me know your experience with example code? I hope you help me. :slight_smile: