# Method Not Allowed in VideoSDK

**URL:** <https://devforum.zoom.us/t/method-not-allowed-in-videosdk/78717>\
**Category:** Video SDK\
**Tags:** api\
**Created:** [November 13, 2022, 6:15am UTC](https://devforum.zoom.us/t/method-not-allowed-in-videosdk/78717 "2022-11-13T06:15:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bradley.dotnet](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/bradley.dotnet/32/42955_2.png) [@bradley.dotnet](https://devforum.zoom.us/u/bradley.dotnet)\
**Post date:** [November 13, 2022, 6:15am UTC](https://devforum.zoom.us/t/method-not-allowed-in-videosdk/78717/1 "2022-11-13T06:15:22Z")

</div>

**Video SDK Type and Version**  
Accessing the REST API v2

**Description**  
Trying to kill a session from C#. Session ID is 4I8wtN3QRkmf4izPrc/2qA==. When I try to PUT against  
[https://api.zoom.us/v2/videosdk/sessions/4I8wtN3QRkmf4izPrc/2qA==/status](https://api.zoom.us/v2/videosdk/sessions/4I8wtN3QRkmf4izPrc/2qA==/status) it gives me a Method Not Allowed status code in the response.

The documentation says that if it starts with a / (it doesn’t) or contains a // (also doesn’t), you have to double encode it. I’m not sure what that even means, but URL encoding the session id does not fix the issue.

**Error?**  
Status code 405 when doing a PUT on [https://api.zoom.us/v2/videosdk/sessions/4I8wtN3QRkmf4izPrc/2qA==/status](https://api.zoom.us/v2/videosdk/sessions/4I8wtN3QRkmf4izPrc/2qA==/status)

**Troubleshooting Routes**  
Tried with and without URL encoding

**How To Reproduce**  
_Steps to reproduce the behavior including:_  
C# app, using this code:

```auto
            var body = JsonConvert.SerializeObject(new
            {
                action = "end"
            });
            var apiUrl = $"{apiEndpoint}/{sessionId}/status";
            var response = await client.PutAsync(apiUrl, new StringContent(body, Encoding.Default, "application/json"));

```

The authorization header is already present and working on the GET endpoint for the session list (which is where it gets the session id from).

---

<div class="post-metadata">

**Author:** ![bradley.dotnet](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/bradley.dotnet/32/42955_2.png) [@bradley.dotnet](https://devforum.zoom.us/u/bradley.dotnet)\
**Post date:** [November 16, 2022, 3:07am UTC](https://devforum.zoom.us/t/method-not-allowed-in-videosdk/78717/2 "2022-11-16T03:07:06Z")

</div>

This post ended up having the answer: [Double encoding on UUIDs](https://devforum.zoom.us/t/double-encoding-on-uuids/50695). Apparently the correct approach is to double **URL** encode the session ID. I’m not sure why, since a single encoding should be more than sufficient.

```auto
var safeSessionId = sessionId.Contains('/') ? HttpUtility.UrlEncode(HttpUtility.UrlEncode(sessionId)) : sessionId;

```

Worked for me though. The documentation could use updating to note both the URL encoding, and the fact that it is needed whenever a “/” is present in the session ID
