APIError(code=-2015): Invalid API-key, IP, or permissions for action.

Note: I have gone though a similar issue mentioned here and it didn’t solve my problem, so I had to post my problem here.
I have also checked if my api works by cross checking with "ccxt library " and it works.

The code is below

from binance.client import Client
test_api_key: ‘Your API key’
test_secret_key: ‘Your secret key’
FUTURES_TESTNET_URL= ‘https://testnet.binancefuture.com/fapi
client = Client(test_api_key, test_secret_key, testnet=True)
info = client.get_account()

The above is a very simple code but still it gives me the error :-

APIError(code=-2015): Invalid API-key, IP, or permissions for action.

It may be issue from the library. You may have a try with this library and see if it works with testnet account.

I figured it out
I just had to use a different endpoint which was UMFUTURES client

Use testnet=True → in params
client = Client(api_key=api_key, api_secret=secret_key, tld= “com”, testnet = True)