# Length of API key string?

**URL:** <http://forum.companieshouse.gov.uk/t/length-of-api-key-string/3327>\
**Category:** API Issues\
**Created:** [October 5, 2020, 9:23pm UTC](http://forum.companieshouse.gov.uk/t/length-of-api-key-string/3327 "2020-10-05T21:23:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![phil\_clark](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/p/c68b51/32.png) [@phil\_clark](http://forum.companieshouse.gov.uk/u/phil_clark)\
**Post date:** [October 5, 2020, 9:23pm UTC](http://forum.companieshouse.gov.uk/t/length-of-api-key-string/3327/1 "2020-10-05T21:23:20Z")

</div>

Hi

This might be a very simple question to answer. I have a 40 char API key as provided through this portal, however it does not appear to work (repeated 400 error codes). Chatting with a friend, he explained he had a 56 char API key that he uses successfully, and I copied it into my code and worked first time. Am I missing something from my API key to make it work?

I am registered for the REST API key.

Sorry if this is a stupid question.  
Phil.

---

<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:** [October 6, 2020, 9:04am UTC](http://forum.companieshouse.gov.uk/t/length-of-api-key-string/3327/2 "2020-10-06T09:04:34Z")

</div>

I have messaged you privately.
