# API key not working

**URL:** <http://forum.companieshouse.gov.uk/t/api-key-not-working/3667>\
**Category:** API Issues\
**Created:** [March 2, 2021, 11:14am UTC](http://forum.companieshouse.gov.uk/t/api-key-not-working/3667 "2021-03-02T11:14:17Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![coredev](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/c/cab0a1/32.png) [@coredev](http://forum.companieshouse.gov.uk/u/coredev)\
**Post date:** [March 2, 2021, 11:14am UTC](http://forum.companieshouse.gov.uk/t/api-key-not-working/3667/1 "2021-03-02T11:14:17Z")

</div>

The interface has changed for generating an api key. I am trying to follow the instructions here [Authentication](https://developer.company-information.service.gov.uk/authentication)

I have added a test application here [https://developer.company-information.service.gov.uk/manage-applications/add](https://developer.company-information.service.gov.uk/manage-applications/add)

I have added a key using the `New API client key` form for the application. I have given it a name `key`

I call

`curl -XGET -u "my API key value": https://api.company-information.service.gov.uk/company/00000006`

replacing the “my API key value” with the `API key` value that it allows you to copy. But I still get `{"error":"Invalid Authorization","type":"ch:service"}`

I have tried different names ie `username`, `api` etc I have also tried adding and removing IP address. I still get the same response. What am I missing

---

<div class="post-metadata">

**Author:** ![brown.declan98](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/b/6f9a4e/32.png) [@brown.declan98](http://forum.companieshouse.gov.uk/u/brown.declan98)\
**Post date:** [March 3, 2021, 3:48pm UTC](http://forum.companieshouse.gov.uk/t/api-key-not-working/3667/2 "2021-03-03T15:48:16Z")

</div>

If you are using an API key generated for a test application you need to use the testing urls instead of the standard API urls.

You can find the urls listed [here](https://developer.company-information.service.gov.uk/api-testing) the one you are looking for is [https://api-sandbox.company-information.service.gov.uk](https://api-sandbox.company-information.service.gov.uk)

Hope that helps

---

<div class="post-metadata">

**Author:** ![coredev](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/c/cab0a1/32.png) [@coredev](http://forum.companieshouse.gov.uk/u/coredev)\
**Post date:** [March 4, 2021, 11:44am UTC](http://forum.companieshouse.gov.uk/t/api-key-not-working/3667/3 "2021-03-04T11:44:21Z")

</div>

When I create an application for `live` it doesn’t appear on the `Live Applications` list, what do I need to do to make it visible?

---

<div class="post-metadata">

**Author:** ![brown.declan98](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/b/6f9a4e/32.png) [@brown.declan98](http://forum.companieshouse.gov.uk/u/brown.declan98)\
**Post date:** [March 4, 2021, 11:49am UTC](http://forum.companieshouse.gov.uk/t/api-key-not-working/3667/4 "2021-03-04T11:49:19Z")

</div>

I’ve had an issue similar to this before with a test app, I just had to sign out and back in, sounds stupid I know but it worked for me.

If that doesn’t work you may need to talk to a moderator, I’ve just tested creating a live app and it showed straight away

---

<div class="post-metadata">

**Author:** ![coredev](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/c/cab0a1/32.png) [@coredev](http://forum.companieshouse.gov.uk/u/coredev)\
**Post date:** [March 4, 2021, 3:25pm UTC](http://forum.companieshouse.gov.uk/t/api-key-not-working/3667/5 "2021-03-04T15:25:56Z")

</div>

Logged in and out several times nothing, tried creating one again this is the end result, nothing

 ![image](http://discourselive.s3.dualstack.eu-west-1.amazonaws.com/original/2X/f/fe6ada725c83070b379f5d320a2f0745ae18bfd7.png)

---

<div class="post-metadata">

**Author:** ![brown.declan98](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/b/6f9a4e/32.png) [@brown.declan98](http://forum.companieshouse.gov.uk/u/brown.declan98)\
**Post date:** [March 4, 2021, 3:39pm UTC](http://forum.companieshouse.gov.uk/t/api-key-not-working/3667/6 "2021-03-04T15:39:36Z")

</div>

Seems like an account issue more than a API issue. I would create an new topic for this issue and see if you can get a moderators help

---

<div class="post-metadata">

**Author:** ![MArkWilliams](http://forum.companieshouse.gov.uk/user_avatar/forum.companieshouse.gov.uk/markwilliams/32/194_2.png) [@MArkWilliams](http://forum.companieshouse.gov.uk/u/MArkWilliams)\
**Post date:** [July 29, 2021, 8:57am UTC](http://forum.companieshouse.gov.uk/t/api-key-not-working/3667/7 "2021-07-29T08:57:44Z")

</div>

This is being investigated.

---

<div class="post-metadata">

**Author:** ![MArkWilliams](http://forum.companieshouse.gov.uk/user_avatar/forum.companieshouse.gov.uk/markwilliams/32/194_2.png) [@MArkWilliams](http://forum.companieshouse.gov.uk/u/MArkWilliams)\
**Post date:** [July 29, 2021, 10:06am UTC](http://forum.companieshouse.gov.uk/t/api-key-not-working/3667/8 "2021-07-29T10:06:26Z")

</div>

This has now been resolved. Apologies for the delay.
