# Invalid\_request: Invalid parameter: client\_id must be a string

**URL:** <https://community.auth0.com/t/invalid-request-invalid-parameter-client-id-must-be-a-string/75154>\
**Category:** Get Help\
**Tags:** api, login, auth0\
**Created:** [December 18, 2021, 1:52pm UTC](https://community.auth0.com/t/invalid-request-invalid-parameter-client-id-must-be-a-string/75154 "2021-12-18T13:52:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![robliou01](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/robliou01/32/34126_2.png) [@robliou01](https://community.auth0.com/u/robliou01)\
**Post date:** [December 18, 2021, 1:52pm UTC](https://community.auth0.com/t/invalid-request-invalid-parameter-client-id-must-be-a-string/75154/1 "2021-12-18T13:52:56Z")

</div>

Hello,

I’m a new user and attempting to integrate Auth0 into my app, which is hosted on my local computer.

I believe I have followed the basic directions correctly. Using the Auth) instructions, I have set up a button on the ‘login’ page of my app which, upon clicking, redirects to the Auth0 login page. Here, the login procedures should be handed over. However, everytime I click the button, I instead get an error page and receive the error:

“invalid\_request: Invalid parameter: client\_id must be a string”

I have checked and re-checked that I correctly input my client-id and Domain variables into my index.js file. It was copy-pasted directly from my Auth0 screen. I believe I have confirmed that it has been correctly input, because the URL that is sent when the button is clicked as follows (added a few X’s in the middle for safety purposes):

[https://dev-7-8i89hb.us.auth0.com/authorize?clientID=stYoaCVnntvAXXXXIdXnxX4riYXRnF&redirect\_uri=http%3A%2F%2Flocalhost%3A4000%2Flogin%2Fredirect&\_reactName=onClick&\_targetInst=null&type=click&nativeEvent=[object%20PointerEvent]&target=[object%20HTMLButtonElement]&currentTarget=[object%20HTMLButtonElement]&eventPhase=3&bubbles=true&cancelable=true&timeStamp=17317.200000001118&defaultPrevented=false&isTrusted=true&view=[object%20Window]&detail=1&screenX=-905&screenY=332&clientX=695&clientY=229&pageX=695&pageY=229&ctrlKey=false&shiftKey=false&altKey=false&metaKey=false&getModifierState=function%20modifierStateGetter(keyArg)%20{ %20%20%20%20%20%20var%20syntheticEvent%20%3D%20this%3B %20%20%20%20%20%20var%20nativeEvent%20%3D%20syntheticEvent.nativeEvent%3B %20%20%20%20%20%20if%20(nativeEvent.getModifierState)%20{ %20%20%20%20%20%20%20%20return%20nativeEvent.getModifierState(keyArg)%3B %20%20%20%20%20%20} %20%20%20%20%20%20var%20keyProp%20%3D%20modifierKeyToProp[keyArg]%3B %20%20%20%20%20%20return%20keyProp%20%3F%20!!nativeEvent[keyProp]%20%3A%20false%3B %20%20%20%20}&button=0&buttons=0&relatedTarget=null&movementX=0&movementY=0&isDefaultPrevented=function%20functionThatReturnsFalse()%20{ %20%20%20%20%20%20return%20false%3B %20%20%20%20}&isPropagationStopped=function%20functionThatReturnsFalse()%20{ %20%20%20%20%20%20return%20false%3B %20%20%20%20}&scope=openid%20profile%20email&response\_type=code&response\_mode=query&state=b0JwbTBPRkFIWDVOMG1Hb0QzMS5CMTJaVzVGb01ZVUgzVk9yZjlvM0J2eQ%3D%3D&nonce=M3hBY2FEWHJNSkRHYnNpRnlvc2xzRnphY1VULTlfOVJaeS1HMlkxbFo2WA%3D%3D&code\_challenge=5IFme86v8SaCrmK6BovzsAiUh7tpFkdqecnjfO8t8JM&code\_challenge\_method=S256&auth0Client=eyJuYW1lIjoiYXV0aDAtcmVhY3QiLCJ2ZXJzaW9uIjoiMS44LjAifQ%3D%3D](https://dev-7-8i89hb.us.auth0.com/authorize?clientID=stYoaCVnntvAXXXXIdXnxX4riYXRnF&redirect_uri=http%3A%2F%2Flocalhost%3A4000%2Flogin%2Fredirect&_reactName=onClick&_targetInst=null&type=click&nativeEvent=%5Bobject%20PointerEvent%5D&target=%5Bobject%20HTMLButtonElement%5D&currentTarget=%5Bobject%20HTMLButtonElement%5D&eventPhase=3&bubbles=true&cancelable=true&timeStamp=17317.200000001118&defaultPrevented=false&isTrusted=true&view=%5Bobject%20Window%5D&detail=1&screenX=-905&screenY=332&clientX=695&clientY=229&pageX=695&pageY=229&ctrlKey=false&shiftKey=false&altKey=false&metaKey=false&getModifierState=function%20modifierStateGetter(keyArg)%20%7B%0A%20%20%20%20%20%20var%20syntheticEvent%20%3D%20this%3B%0A%20%20%20%20%20%20var%20nativeEvent%20%3D%20syntheticEvent.nativeEvent%3B%0A%0A%20%20%20%20%20%20if%20(nativeEvent.getModifierState)%20%7B%0A%20%20%20%20%20%20%20%20return%20nativeEvent.getModifierState(keyArg)%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20var%20keyProp%20%3D%20modifierKeyToProp%5BkeyArg%5D%3B%0A%20%20%20%20%20%20return%20keyProp%20%3F%20!!nativeEvent%5BkeyProp%5D%20%3A%20false%3B%0A%20%20%20%20%7D&button=0&buttons=0&relatedTarget=null&movementX=0&movementY=0&isDefaultPrevented=function%20functionThatReturnsFalse()%20%7B%0A%20%20%20%20%20%20return%20false%3B%0A%20%20%20%20%7D&isPropagationStopped=function%20functionThatReturnsFalse()%20%7B%0A%20%20%20%20%20%20return%20false%3B%0A%20%20%20%20%7D&scope=openid%20profile%20email&response_type=code&response_mode=query&state=b0JwbTBPRkFIWDVOMG1Hb0QzMS5CMTJaVzVGb01ZVUgzVk9yZjlvM0J2eQ%3D%3D&nonce=M3hBY2FEWHJNSkRHYnNpRnlvc2xzRnphY1VULTlfOVJaeS1HMlkxbFo2WA%3D%3D&code_challenge=5IFme86v8SaCrmK6BovzsAiUh7tpFkdqecnjfO8t8JM&code_challenge_method=S256&auth0Client=eyJuYW1lIjoiYXV0aDAtcmVhY3QiLCJ2ZXJzaW9uIjoiMS44LjAifQ%3D%3D)

It would appear from the URL that the Client-ID is correctly formatted, so what gives for me receiving this error?

Thank you in advance,  
Rob

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [December 20, 2021, 3:32pm UTC](https://community.auth0.com/t/invalid-request-invalid-parameter-client-id-must-be-a-string/75154/3 "2021-12-20T15:32:42Z")

</div>

Hi @robliou01,

It looks like your `authorize` URL is leaking some React code. Can you share the code snippet the call that generates that URL?

---

<div class="post-metadata">

**Author:** ![robliou01](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/robliou01/32/34126_2.png) [@robliou01](https://community.auth0.com/u/robliou01)\
**Post date:** [January 6, 2022, 3:32am UTC](https://community.auth0.com/t/invalid-request-invalid-parameter-client-id-must-be-a-string/75154/4 "2022-01-06T03:32:55Z")

</div>

Hi @dan.woda, sorry for the delayed response here.

I earlier adjusted my login.js to just use the default method as suggested by Auth0:

**const { loginWithRedirect } = useAuth0();**

Therefore, I don’t think there should be any memory leaks taking place anymore…

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [January 21, 2022, 3:33am UTC](https://community.auth0.com/t/invalid-request-invalid-parameter-client-id-must-be-a-string/75154/5 "2022-01-21T03:33:12Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
