# Invalid Grant Type for Oauth app using PHP

**URL:** <https://devforum.zoom.us/t/invalid-grant-type-for-oauth-app-using-php/87191>\
**Category:** Authentication\
**Created:** [April 21, 2023, 8:20pm UTC](https://devforum.zoom.us/t/invalid-grant-type-for-oauth-app-using-php/87191 "2023-04-21T20:20:11Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![MultiplayerSession](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/multiplayersession/32/66446_2.png) [@MultiplayerSession](https://devforum.zoom.us/u/MultiplayerSession)\
**Post date:** [May 2, 2023, 4:07pm UTC](https://devforum.zoom.us/t/invalid-grant-type-for-oauth-app-using-php/87191/13 "2023-05-02T16:07:24Z")

</div>

Can you provide a code snippet of how you’re producing the request to `https://zoom.us/oauth/token`? I’m particularly interested in the headers are being prepared and how the body is being generated. Our application is sending `Content-Type: application/x-www-form-urlencoded; charset=utf-8` and using PHP’s `http_build_query` function to produce the query string which should yield a body like `grant_type=authorization_code&code=&redirect_uri=`.

---

_[View the full topic](https://devforum.zoom.us/t/invalid-grant-type-for-oauth-app-using-php/87191)._
