GST Return Status

FREEMIUM
By adarshmadrecha | Updated il y a 4 jours | Business
Popularity

9.6 / 10

Latency

403ms

Service Level

95%

Health Check

N/A

Back to All Discussions

Not working - Invalid API KEY

Rapid account: Pvarshney 1995
pvarshney1995
il y a 9 mois

error 400 Invalid API KEY

Rapid account: Asiwaldipesh
asiwaldipesh Commented il y a 9 mois

Sorry for barging in but i too came across this while searching for a bulk GST verification tool and tried it but i too am getting an error while running the code
Here’s the code : -

const axios = require(‘axios’);

const options = {
method: ‘GET’,
url: ‘https://gst-return-status.p.rapidapi.com/free/gstin/27AAJCM9929L1ZM’,
headers: {
‘Content-Type’: ‘application/json’,
‘X-RapidAPI-Key’: ‘**************************************************’,
‘X-RapidAPI-Host’: ‘gst-return-status.p.rapidapi.com
}
};

try {
const response = await axios.request(options);
console.log(response.data);
} catch (error) {
console.error(error);
}

Could you Please help me out here…

Rapid account: Pvarshney 1995
pvarshney1995 Commented il y a 9 mois

This is the code. I have put valid API Key but when I am running the code it is giving me error 400 “Invalid API Key”

Rapid account: Pvarshney 1995
pvarshney1995 Commented il y a 9 mois

document.addEventListener(‘DOMContentLoaded’, function() {
const submitBtn = document.getElementById(‘submitBtn’);
const outputDiv = document.getElementById(‘output’);

submitBtn.addEventListener(‘click’, function() {
const gstinInput = document.getElementById(‘gstinInput’).value;

if (gstinInput) {
  const apiUrl = `https://gst-return-status.p.rapidapi.com/free/gstin/${encodeURIComponent(gstinInput)}`;
  
  fetch(apiUrl, {
    method: 'GET',
    headers: {
          'Content-Type': 'application/json',
          'X-RapidAPI-Key': 'HERE I HAVE PUT MY API KEY',
        'X-RapidAPI-Host': 'gst-return-status.p.rapidapi.com'
      
    }
  })
  .then(response => {
    if (!response.ok) {
      throw new Error(`API request failed with status: ${response.status}`);
    }
    return response.json();
  })
  .then(data => {
    outputDiv.textContent = JSON.stringify(data, null, 2);
  })
  .catch(error => {
    outputDiv.textContent = `An error occurred: ${error.message}`;
  });
} else {
  outputDiv.textContent = 'Please enter a valid GSTIN.';
}

});
});

Rapid account: Adarshmadrecha
adarshmadrecha Commented il y a 9 mois

Pls share your code.
Moreover, we have released the same API on https://portal.jamku.app
Here, minimum payment is 5000 Rs per year.

Join in the discussion - add comment below:

Login / Signup to post new comments