# Create meeting API gives 401 error on server

**URL:** <https://devforum.zoom.us/t/create-meeting-api-gives-401-error-on-server/89546>\
**Category:** API and Webhooks\
**Tags:** api\
**Created:** [June 2, 2023, 2:41pm UTC](https://devforum.zoom.us/t/create-meeting-api-gives-401-error-on-server/89546 "2023-06-02T14:41:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![shebalovdenis](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/shebalovdenis/32/49075_2.png) [@shebalovdenis](https://devforum.zoom.us/u/shebalovdenis)\
**Post date:** [June 2, 2023, 2:41pm UTC](https://devforum.zoom.us/t/create-meeting-api-gives-401-error-on-server/89546/1 "2023-06-02T14:41:13Z")

</div>

I use this endpoint - [https://api.zoom.us/v2/users/me/meetings](https://api.zoom.us/v2/users/me/meetings)  
Locally everything works fine.  
But after deploy to k8s - I am getting getting 401 (Unauthorized).

Creating auth token like that:

```auto
     private string CreateAuthToken(string apiSecret, string issuer)
        {
            var tokenHandler = new JwtSecurityTokenHandler();
            var now = DateTime.UtcNow;
            byte[] symmetricKey = Encoding.ASCII.GetBytes(apiSecret);

            var tokenDescriptor = new SecurityTokenDescriptor
            {
                Issuer = issuer,
                Expires = now.AddSeconds(3000),
                SigningCredentials = new SigningCredentials(new SymmetricSecurityKey(symmetricKey), SecurityAlgorithms.HmacSha256),
            };
            var token = tokenHandler.CreateToken(tokenDescriptor);
            var tokenString = tokenHandler.WriteToken(token);
     
            return tokenString;
        }

```

What could be the root cause of that?  
Thanks for your help in advance.

---

<div class="post-metadata">

**Author:** ![ojus.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ojus.zoom/32/734_2.png) [@ojus.zoom](https://devforum.zoom.us/u/ojus.zoom)\
**Post date:** [June 5, 2023, 8:55pm UTC](https://devforum.zoom.us/t/create-meeting-api-gives-401-error-on-server/89546/2 "2023-06-05T20:55:18Z")

</div>

@shebalovdenis Was it working previously? If yes, it seems you were using JWT credentials. You need to migrate to the new server to server Oauth app type.

Here is the guide:

> **[Server-to-Server OAuth](https://developers.zoom.us/docs/internal-apps/s2s-oauth/)**
>
> The Zoom Developer Platform is an open platform that allows third-party developers to build applications and integrations upon Zoom’s video-first unified communications platform.

---

<div class="post-metadata">

**Author:** ![shebalovdenis](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/shebalovdenis/32/49075_2.png) [@shebalovdenis](https://devforum.zoom.us/u/shebalovdenis)\
**Post date:** [June 5, 2023, 9:43pm UTC](https://devforum.zoom.us/t/create-meeting-api-gives-401-error-on-server/89546/3 "2023-06-05T21:43:19Z")

</div>

Thank you so much for your response.  
Locally app and auth to zoom continues to work. I just have cheked.  
It was my first deploy to k8s and auth failed with the first api call.  
I am developing simple api app that creates links to zoom meetins.  
Do you have any ideas what could be the cause of the issue that I faced after deploy to the server?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [June 8, 2024, 1:19pm UTC](https://devforum.zoom.us/t/create-meeting-api-gives-401-error-on-server/89546/4 "2024-06-08T13:19:22Z")

</div>

Closed on June 8, 2024, 1:19pm UTC

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