# Update Registrants Status - Cancel

**URL:** <https://devforum.zoom.us/t/update-registrants-status-cancel/19369>\
**Category:** API and Webhooks\
**Created:** [May 28, 2020, 10:12am UTC](https://devforum.zoom.us/t/update-registrants-status-cancel/19369 "2020-05-28T10:12:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![it13](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/it13/32/5424_2.png) [@it13](https://devforum.zoom.us/u/it13)\
**Post date:** [May 28, 2020, 10:12am UTC](https://devforum.zoom.us/t/update-registrants-status-cancel/19369/1 "2020-05-28T10:12:51Z")

</div>

I use /registrants/status API, and found response status = Unauthorized.  
I confirm the token is okay. Do you know what goes wrong?

#region assign parameters into local parameters  
string htmlTemplate = string.Empty;  
Int64 webinarID = Convert.ToInt64(w.id);  
string registrantID = r.ID;  
string registrantEmail = r.email;  
dynamic obj = new  
{  
action = “cancel”,  
registrants = new GenericClass  
{  
new GenericClass { id = registrantID, email = registrantEmail }  
}  
};  
string jsonString = JsonConvert.SerializeObject(obj, Formatting.Indented);  
#endregion

---

<div class="post-metadata">

**Author:** ![Phillip](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/phillip/32/9414_2.png) [@Phillip](https://devforum.zoom.us/u/Phillip)\
**Post date:** [May 29, 2020, 6:47pm UTC](https://devforum.zoom.us/t/update-registrants-status-cancel/19369/2 "2020-05-29T18:47:17Z")

</div>

Hey @it13,

Are you using a JWT or OAuth token? And, do you have the write permission to edit these registrants?

This would also need to be a `PUT` request to update the status; otherwise, this may return an unauthorized request method.

Phillip

---

<div class="post-metadata">

**Author:** ![it13](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/it13/32/5424_2.png) [@it13](https://devforum.zoom.us/u/it13)\
**Post date:** [May 29, 2020, 7:03pm UTC](https://devforum.zoom.us/t/update-registrants-status-cancel/19369/3 "2020-05-29T19:03:06Z")

</div>

We use JWT. and we use PUT method as well. I drop the code below if it helps out.

public Zoom CancelRegistrant(Zoom z, Zoom.Registrant r, Zoom.Webinar w)  
{  
#region assign parameters into local parameters  
string htmlTemplate = string.Empty;  
Int64 webinarID = Convert.ToInt64(w.id);  
string registrantID = r.ID;  
string registrantEmail = r.email;  
#region test  
dynamic obj1 = new  
{  
action = “cancel”,  
registrants = new GenericClass  
{  
new GenericClass { id = registrantID, email = registrantEmail }  
}  
};  
string jsonString = JsonConvert.SerializeObject(obj1, Formatting.Indented);  
#endregion  
#endregion  
#region declare bridge  
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;  
var client = new RestSharp.RestClient(“[https://api.zoom.us/v2/webinars/](https://api.zoom.us/v2/webinars/)” + webinarID + “/registrants/status”);  
var request = new RestRequest(Method.PUT);  
#endregion  
#region declare request API  
request.AddHeader(“content-type”, “application/json”);  
request.AddHeader(“authorization”, z.authorization);  
request.AddParameter(“application/json”, jsonString, ParameterType.RequestBody);  
IRestResponse responseClass = client.Execute\<Zoom.Registrant\>(request);  
#endregion  
#region get response  
if (responseClass.IsSuccessful)  
{  
z.isSuccessful = responseClass.IsSuccessful;  
}  
else  
{  
z.isSuccessful = false;  
}  
#endregion  
#region output  
return z;  
#endregion  
}

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [June 4, 2020, 4:20pm UTC](https://devforum.zoom.us/t/update-registrants-status-cancel/19369/5 "2020-06-04T16:20:11Z")

</div>

Hey @it13,

Are you cancelling registrants to a webinar you own?

Can you send all these details and the webinarID to [developersupport@zoom.us](mailto:developersupport@zoom.us) so we can debug further?

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![DeveloperBot](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/developerbot/32/12632_2.png) [@DeveloperBot](https://devforum.zoom.us/u/DeveloperBot)\
**Post date:** [August 21, 2020, 9:52pm UTC](https://devforum.zoom.us/t/update-registrants-status-cancel/19369/7 "2020-08-21T21:52:15Z")

</div>

Closed on August 21, 2020, 9:52pm UTC


