# Error code=401 when create a meeting using Java API call

**URL:** <https://devforum.zoom.us/t/error-code-401-when-create-a-meeting-using-java-api-call/129408>\
**Category:** API and Webhooks\
**Tags:** api\
**Created:** [March 7, 2025, 3:01pm UTC](https://devforum.zoom.us/t/error-code-401-when-create-a-meeting-using-java-api-call/129408 "2025-03-07T15:01:48Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![alexm](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/alexm/32/67701_2.png) [@alexm](https://devforum.zoom.us/u/alexm)\
**Post date:** [March 7, 2025, 3:30pm UTC](https://devforum.zoom.us/t/error-code-401-when-create-a-meeting-using-java-api-call/129408/2 "2025-03-07T15:30:35Z")

</div>

Hi @Glenn1, welcome to the forum!

An HTTPS Error `401` indicates to me that your auth header is incorrect. Looking at this line:

> [@Glenn1](#):
>
> `RequestBody body = RequestBody.create("grant_type=client_credentials",mediaType);`

In my application, the `grant_type` I’m using is `account_credentials` not `client_credentials`, so give that a shot.

EDIT: Just to add, I’m also specifying my account ID in the request, which I don’t see in yours:  
`oauth/token?grant_type=account_credentials&account_id=${MY_ZOOM_ACCOUNT_ID}`

---

_[View the full topic](https://devforum.zoom.us/t/error-code-401-when-create-a-meeting-using-java-api-call/129408)._
