Invalid API-key for binance

I’m newbie on crypto trading, i’m following the procedure from binance for trading via Postman.

My question:
how can i solve what follows?

Issue details:

I followed this procedure:

and work on a PC with windows10.

when I send the request located at Collections/Binance spot API/Trade/GET Account information (USER DATA)
i’ve the following error message:

“code”: -2015,
“msg”: “Invalid API-key, IP, or permissions for action.”

I’ve already tried:

my issue is that possible reasons from previous similar incidents have been checked unsuccesfully:

  • the Binance API key has been generated with only thicking options:

    • enable reading : yes
    • enable spot & margin trading: yes
    • all other options → no
      → API restriction: “Restrict access to trusted IPs only”
      IP adress obtained by cmd/ipconfig → provides IPv4 adress
      (same error with “Unrestricted” option)
  • the API key and secret key have been set in the Binance Spot Testnet API “current value” field and this same environment has been selected in the top right envirnment field

  • in the “Collections/Binance spot API/Trade/GET Account Information (USER_DATA)” request, the timestamp and signature seems ok but i’m not able to juge the request code:

  • also the header “X-MBX-APIKEY” is selected

and the SEND action finally lead to the error message:

the only un-consistancy that i noted are:

  • the environment is the “Testnet” and the collection mentionned in the procedure uses the “Binance spot API” that doesn’t mention the “testnet” word and there are some warning in some supports that says that tesstnet and production API are not the same

  • the procedure mentionned to generate a HMAC “SHA256” and Binance has not mentionned this SHA256 when the HMAC API key is created

could you please give me some help?

1 Like

+1 I’ve the same issue and still don’t understand what I’ve missed, if you find the issue I’m really curious about it.

I have exactly the same issue, these are m steps

I am trying to test my API Binance open orders by PostMan

This is the get request i am sending


and i get this error

“code”: -2015,
“msg”: “Invalid API-key, IP, or permissions for action.”

Status code: 401

These are the steps i have done

Generated my api-secret and api-key from binance and enabled my IP address with Spot & Margin Trading

In my PostMan i have added the environment Binance Spot TestNet API

I have added the api-key and api-secret in the environment

The Timestamp, Signature, Initial Value fields can be left empty as they’ll be automatically filled by Postman when sending a request

I have followed exactly these instructions succesfully from here : GitHub - binance/binance-api-postman: Postman collection for Binance Public API, including spot, margin, futures, etc.

But when i send this get request i received the error

“code”: -2015,
“msg”: “Invalid API-key, IP, or permissions for action.”

Have you found the solution?

Same problem here. Not sure how this will get resolved. BTW I am an IT professional and know how postman or api key requests work.

For me the problem at the end was that i was pasting the wrong IP ( as the msg says: “Invalid API-key, IP, or permissions for action ) but it was not easy to catch, i recommend using this website to chekk your IP => Thanks