Error: Invalid API-key, IP, or permissions for action. NODE.JS

I’m trying to make any api call in test network but i’m unable to connect to do so.
Generated keys from

Error: Invalid API-key, IP, or permissions for action.
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: -2015,
url: ‘’}

const Binance = require('binance-api-node').default;

// Replace with your Binance API key

const client = Binance({

  apiKey: 'key from',

  apiSecret: 'secret from',

  test: true, // Use the Binance Testnet

  verbose: true,

  urls: {

     base: '',

     combineStream: 'wss://',

     stream: 'wss://'



// Replace with the symbol of the spot market you want to buy

const symbol = 'BTCUSDT';

// Replace with the quantity of the spot market you want to buy

const quantity = 1;


  symbol: symbol,

  side: 'BUY',

  type: 'MARKET',

  quantity: quantity


  .then((response) => {


    // Handle success


  .catch((error) => {


    // Handle error


This thing got me 1 step further:

npm install @binance/connector

const { Spot } = require('@binance/connector')

const apiKey = ''

const apiSecret = ''

// provide the testnet base url

const client = new Spot(apiKey, apiSecret, { baseURL: ''})

// Get account information

client.account().then(response => client.logger.log(

// Place a new order

client.newOrder('BNBUSDT', 'BUY', 'LIMIT', {

  price: '350',

  quantity: 1,

  timeInForce: 'GTC'

}).then(response => client.logger.log(

  .catch(error => client.logger.error(error))

All of them are very complicated there is another package called Mida you can use on GitHub GitHub - Reiryoku-Technologies/Mida: The open-source and cross-platform trading framework

Here’s how to connect to testnet with the npm package called binance (note it’s not an official SDK, but a very famous one):

i don,t now any about programation but on my bot i have a message to error , it,s say ; Error: Issue creating buyTV order:“binance temporary banned: {"code":-2015,"msg":"Invalid API-key, IP, or permissions for action."}”
, how can I fix the problem