# Invalid API/Subscription Key **Category:** [Growth Charts](https://forum.rcpch.tech/c/rcpch-digital-growth-charts/6) **Created:** 2024-11-10 16:01 UTC **Views:** 67 **Replies:** 18 **URL:** https://forum.rcpch.tech/t/invalid-api-subscription-key/243 --- ## Post #1 by @aaml Hi I am getting the following error: {"message":"Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription.","statusCode":401} This used to work absolutely fine. I've tried regenerating my API key and using a new one and tried using the secondary key. I've not changed anything else. Any suggestions please? I am using the free tier and its in my account and I can see the key under my account. --- ## Post #2 by @pacharanero Ok will look into it, which email address or so name did you use for that API key? I'll look at the APIM backend but it will probably be tomorrow. --- ## Post #3 by @aaml Name on the account is Aakash Amlani --- ## Post #4 by @michael.barton [quote="aaml, post:3, topic:243"] Aakash Amlani [/quote] Hi @aaml sorry for the issues with your API key, we've moved to a new instance of our API management platform and I didn't migrate across your key. I've now set it up on the new platform, let me know if you have any further issues. --- ## Post #5 by @aaml Hi, I'm using the key from my account on here but I still get the same error - no valid subscription key. --- ## Post #6 by @michael.barton Sorry Aakash I'm not sure what has gone wrong here. I've checked the keys associated with both your accounts and they are working: - @aaml (key starts `034`) - @aml (key starts `ea5`) - We also have a key migrated from the old platform (starts `b72`) Let me know which one you are using and if you're still seeing issues. If it's none of the above please post the first three characters of the key and I can look further. --- ## Post #7 by @raman0503 Apologies for hijacking this thread but I am having the same problem. I have pinged an email to the growth chart email but as I haven't used the API key for a while I suspect its the same issues as Aakash. Ta Raman --- ## Post #8 by @michael.barton No problem @raman0503. Your key still works, you can view it under your [profile page](https://forum.rcpch.tech/u/raman0503/apim). --- ## Post #9 by @royi Hello, I am also getting the same status code when I try to call the API. I will really appreciate some assistance. --- ## Post #10 by @pacharanero Have you checked your API key on the APIM page? URL for anyone wanting to see this is https://forum.rcpch.tech/my/apim But you can also get there by navigating to your profile in the right top avatar menu --- ## Post #11 by @royi Yes Marcus, I did but still getting the same response. --- ## Post #12 by @michael.barton That's odd @royi. Could you share an example of the code you're using to make the request? --- ## Post #13 by @royi It starts with e625 and ends with 437. Or do you need the code in full? --- ## Post #14 by @michael.barton Ah yep that’s your API key. I meant the code (curl request, Python etc) you’re using to call the API. Also what URL are you calling? --- ## Post #16 by @royi I am using https://api.rcpch.ac.uk/growth/v1/uk-who/calculation I started reading the documentation today so I might be doing something wrong maybe. --- ## Post #17 by @royi Error from curl is; curl: (23) Failure writing output to destination, passed 4608 returned 0 --- ## Post #18 by @pacharanero [quote="royi, post:17, topic:243"] Failure writing output to destination, passed 4608 returned 0 [/quote] This doesn't sound to me like an issue with the API, more sounds like a permissions issue writing to the destination (eg Stdout or a file) on your machine. Can you share the cURL code? (redact the API key though!!!) --- ## Post #19 by @pacharanero The cURL part of our docs is here: https://growth.rcpch.ac.uk/integrator/making-api-calls/#using-curl-to-make-a-test-request --- ## Post #20 by @royi I didn't hav jq installed on my machine. Thank you all. --- **Canonical:** https://forum.rcpch.tech/t/invalid-api-subscription-key/243 **Original content:** https://forum.rcpch.tech/t/invalid-api-subscription-key/243