# Client ID not being recognised

**URL:** <https://devforum.zoom.us/t/client-id-not-being-recognised/5704>\
**Category:** API and Webhooks\
**Created:** [August 28, 2019, 8:31am UTC](https://devforum.zoom.us/t/client-id-not-being-recognised/5704 "2019-08-28T08:31:48Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [September 4, 2019, 8:35pm UTC](https://devforum.zoom.us/t/client-id-not-being-recognised/5704/8 "2019-09-04T20:35:41Z")

</div>

Hey @rich,

Here is whats happening, in your app dashboard you have  
`https://dev.thetherapy.space/_ajax/?ajax_response=oauth&model=zoom&componentID=external_connections`  
as your redirect url.

Then when you go to authorize your app:

`https://zoom.us/oauth/token?grant_type=authorization_code&code=6Y6x0lVGDt_XXXMxyKRRhOz1obX4Z0I6g&redirect_uri=https://dev.thetherapy.space/_ajax/?ajax_response=oauth&model=zoom&componentID=external_connections`

Zoom handles your `&model=zoom&componentID=external_connections` as the base URL’s query param, so Zoom is comparing

`https://dev.thetherapy.space/_ajax/?ajax_response=oauth&model=zoom&componentID=external_connections`

with

`https://dev.thetherapy.space/_ajax/?ajax_response=oauth`

hence you getting the error:

```json
{
“reason”: “Invalid request : Redirect URI mismatch.”,
“error”: “invalid_request”
}

```

(I tested having the first query param of `?ajax_response=oauth` works, but when you add another one with `&` it breaks.)

This is the case for most OAuth flows including Googles API. ([Referencing this stack overflow answer](https://stackoverflow.com/a/7722099/6592510))

**That being said,**

The correct way to do this, is to add a query param to the end of the authorization url itself, instead of the redirect url.

For example in my App Dashboard I have `https://zoom.us` as my redirect url, and then I added a `&state=data` query param to the auth url:

`https://zoom.us/oauth/authorize?response_type=code&client_id={{ clientID }}&redirect_uri=https://zoom.us&state=somedata`

This will take you to `https://zoom.us/?code=zoiAoSEm98_KdYKjnimT4KPd8KKdQt9FQ&state=data`.

Then when requesting an access\_token, pass I pass in `https://zoom.us` as the `redirect_url` and it works.

`https://zoom.us/oauth/token?code=zoiAoSEm98_KdYKjnimT4KPd8KKdQt9FQ&grant_type=authorization_code&redirect_uri=https://zoom.us`

Let me know if this helps!

Thanks,  
Tommy

---

_[View the full topic](https://devforum.zoom.us/t/client-id-not-being-recognised/5704)._
