# OAuth2 Auth Code error

**URL:** <https://devforum.zoom.us/t/oauth2-auth-code-error/116653>\
**Category:** Meetings\
**Created:** [August 30, 2024, 6:04am UTC](https://devforum.zoom.us/t/oauth2-auth-code-error/116653 "2024-08-30T06:04:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![samhithasathya](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/samhithasathya/32/58698_2.png) [@samhithasathya](https://devforum.zoom.us/u/samhithasathya)\
**Post date:** [August 30, 2024, 6:04am UTC](https://devforum.zoom.us/t/oauth2-auth-code-error/116653/1 "2024-08-30T06:04:24Z")

</div>

```auto
I get the error {"reason":"unsupported grant type","error":"unsupported_grant_type"} when I try to get access token from - 

 from apex - oracle database pl/sql.

Here are the details - 
apex_web_service.g_request_headers(1).name := 'Content-Type';
apex_web_service.g_request_headers(1).value := 'application/x-www-form-urlencoded';
apex_web_service.g_request_headers(2).name := 'Host';
apex_web_service.g_request_headers(2).value := 'zoom.us';
apex_web_service.g_request_headers(3).name := 'Authorization';
apex_web_service.g_request_headers(3).value := 'Basic xxxxxxxxxxxxxxxxxxxxxxxxx=='; -- base 64 encoded client_id:secret
l_request_body := 'grant_type: authorization_code&code: xxxxxxx&redirect_uri: ..../redirect'; -- code I get from redirect url from the following request - .../authorize?response_type=code&client_id=7lstjK9NTyett_oeXtFiEQ&redirect_uri={abc.com redirect uri}

l_response := APEX_WEB_SERVICE.MAKE_REST_REQUEST(
    p_url => '.../token',
    p_http_method => 'POST',
    p_body => l_request_body,
    --p_credential_static_id => 'Authorization',
	p_proxy_override => 'xxxxxxx.com:80'
 );
 dbms_output.put_line(l_response);

Please let me know what I am missing here.

```
