error 400 Invalid API KEY
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…
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”
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.'; }
}); });
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:
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…
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”
document.addEventListener(‘DOMContentLoaded’, function() {
const submitBtn = document.getElementById(‘submitBtn’);
const outputDiv = document.getElementById(‘output’);
submitBtn.addEventListener(‘click’, function() {
const gstinInput = document.getElementById(‘gstinInput’).value;
});
});
Pls share your code.
Moreover, we have released the same API on https://portal.jamku.app
Here, minimum payment is 5000 Rs per year.