I have two api testers currently. both boxes are green indicating they are connected; however both are showing no response. They both generate a response in postman and my metals-api shows requests being made. I cant attach an screenshots as of now bc of an iframe issue.
Hello Eric,
Thanks for posting in! You can upload your screenshot to a 3rd party site like Dropbox so we can see it. If you won’t mind, you can also provide us with your WP details so we can log in and investigate your site. You can create a secure note in your next reply with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role
– Confirmation that we can access and make changes to your site
To know how to create a secure note, please check this out: How The Forum Works
Best Regards.
Hey Eric,
Could you please provide the API keys for the Metals API so that we can run a test? Please enter the key in the secure note below.
Thanks.
Thank you for the reply. I replied to a previous note, I didnt see a secure reply below your message. But this one has the same info you asked for.
Hello Eric,
We are getting green info, which is good:
- screenshot in the secure note below
This means we have successfully connected to the API. The problem is that since we did not get any response since we still need the correct api key for the api to return the items.
Best Regards.
Did you do something different? I never had a response. And the coingecko API still doesn’t, correct?
Hello Eric,
With the demo API, you can connect with limited number of requests. Sometimes, you get returns and most of the times, you’ll get a response of “Too many request”. This is likely indicating that the rate limit has reached. The user should reduce the number of calls made, or consider scaling their service plan that has much higher rate limits and call credits.
Check out this demo I created using the demo API:
- See the link in the secure note below.
Best Regards.
So it’s working? The no response part didn’t curate a 400 error. We used these APIs just for tests but figured the response would be a 429. But neither generated a response. How in the future, if there is an API issue, would we diagnose the problem?
The link just took me to our under construction page.
Hey Eric,
You need to be logged in to be able to view the api demo I created in your site.
Use {{d:looper:debug_consumer}} to see the output of the Looper Consumer. This is where youi can see the response and the info data keys. Please check the api demo page I have created. It allows me to display the Bitcoin price and the list of coins.
Hope this helps.
I copied what you have created with a different api. I’m not even getting the same categories. In customizer i do not get the “endpoint” category nor do i get the “follow redirect” in the bottom of the customizer section. I’m getting different error codes if i paste the url into the search bar vs the cornerstone redbox.
Hello Eric,
You need to check the documentation of the API:
Be advised that the API may have different endpoints and error codes. They also have different authentication. When I tested Metals API, I was able to connect with no response because the connection reached its limit.
I would highly recommend that you use {{d:looper:debug_consumer}} to check the response data. This is where you can see the error message as well.

By the way, I noticed that you added this JavaScript code in Global CSS:
// Add to a Cornerstone Custom Code element or theme script
async function updateDebtInBTC() {
try {
// Fetch U.S. national debt
const debtResponse = await fetch('https://api.fiscaldata.treasury.gov/services/api/fiscal_service/v1/accounting/od/debt_to_penny?fields=total_public_debt_outstanding&sort=-record_date&limit=1');
if (!debtResponse.ok) throw new Error('Debt API error');
const debtData = await debtResponse.json();
const debtUSD = parseFloat(debtData.data[0].total_public_debt_outstanding || 0);
// Fetch BTC price
const btcResponse = await fetch('https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd');
if (!btcResponse.ok) throw new Error('BTC API error');
const btcData = await btcResponse.json();
const btcUSD = parseFloat(btcData.bitcoin.usd || 0);
// Compute and display
const debtInBTC = debtUSD > 0 && btcUSD > 0 ? Math.round(debtUSD / btcUSD).toLocaleString() : 'Calculation error';
document.getElementById('debt-in-btc').innerText = debtInBTC; // Assumes a <span id="debt-in-btc">
document.getElementById('debt-usd').innerText = debtUSD.toLocaleString('en-US', { maximumFractionDigits: 0 });
document.getElementById('btc-price').innerText = btcUSD.toLocaleString('en-US', { maximumFractionDigits: 2 });
} catch (error) {
console.error(error);
document.getElementById('debt-in-btc').innerText = 'Error';
}
}
// Run on page load
updateDebtInBTC();
// Optional: Refresh every 5 minutes
setInterval(updateDebtInBTC, 300000);
I have removed it because it is causing some issues with the page.
You can check out the demo test I have created.
Thanks.
thank you. one thing is i keep seeing the API key exposed. doesn’t placing the api key in the ‘path’ open it up for security issues? Aren’t they supposed to be in the globals (https://theme.co/docs/external-api-integration)? I noticed you placed the coingecko api in the Globals and not the Metals API. Why?
Hello Eric,
I used both of them, the External API and the Globals API, for testing. I even set up a new Global API for testing the Metals API. The return is intermittent. It could be due to the request limit being reached.
The only thing I noticed is that with Coin Gecko, though it limits requests, it allows access even without authentication. They also provide a good API documentation.
Best Regards.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.





