I 'm creating a Zoom-API-Wrapper class and I'm using the CURLSMBS class for the actual call and it's coming along quite well. There is one call however I can't seem to get to work (I always get error 405 method not allowed): This is the contructor of my custom CURLSMBS-class. I don't believe there is anything wrong with it as all other calls (create /delete User) succeed.
Public Sub constructor() Me.OptionVerbose = DebugBuild Me.CollectOutputData = True Me.OptionUserAgent = "JWT-Zoom-Client" Me.OptionFollowLocation = True Me.OptionMaxRedirs = 3 Dim headerArray() As String headerArray.Append "content-type: application/json;charset=UTF-8" headerArray.Append "Accept: */*" headerArray.Append "Accept-Encoding: gzip, deflate" headerArray.Append "Cache-Control: no-cache" headerArray.Append "Connection: keep-alive" headerArray.Append "Authorization: Bearer "+ZoomStuff.JWT headerArray.Append "Host: api.zoom.us" Me.SetOptionHTTPHeader headerArray End Sub Here is the actual call: Public Function updateUserAccountTypeForCoach(theUser as User, accountType as Integer) as string Dim result As String //see: https://marketplace.zoom.us/docs/api-reference/zoom-api/users/userupdate Me.OptionURL = "https://api.zoom.us/v2/users/"+theuser.zoom_id Me.OptionCustomRequest = "PATCH" //this might be the culprit as the error says Allow: GET, POST Var zoomUser As New JSONItem Var userInfo As New JSONItem userInfo.value("email")=theUser.email userInfo.value("type")=accountType userInfo.value("first_name")=theUser.firstname userInfo.value("last_name")=theUser.lastname zoomUser.Value("user_info")=userInfo zoomUser.Compact=True//kills white spaces Var fields As String=zoomUser.ToString Me.OptionPostFields = fields Me.OptionPost = True Var e As Integer=Me.Perform Var callresult As String=Me.OutputData Var header As String=Me.HeaderData//contains HTTP/1.1 405 Date: Mon, 20 Jan 2020 07:58:28 GMT Content-Type: text/html;charset=utf-8 Transfer-Encoding: chunked Connection: keep-alive Server: ZOOM x-zm-trackingid: WEB_491537273a503797930ffc4156d7d154 X-Content-Type-Options: nosniff Cache-Control: no-cache, no-store, must-revalidate, no-transform Pragma: no-cache Expires: Thu, 01 Jan 1970 00:00:00 GMT Set-Cookie: cred=1306A2875ACFCF07FFF20EDE5B4657B7; Path=/; Secure; HttpOnly Allow: GET, POST Set-Cookie: _zm_currency=EUR; Domain=.zoom.us; Expires=Tue, 21-Jan-2020 07:58:28 GMT; Path=/; Secure Set-Cookie: _zm_mtk_guid=a5370539c5c046bb9eed0313d0517c0c; Domain=.zoom.us; Path=/; Secure Content-Language: en-US If e<>0 Or header.contains("204")=False Then// Return result+" Error code is:"+e.ToString+"Zoom-Error is "+header+EndOfLine+callresult Else Return callresult End If return result End Function The thing is, If I execute this from the terminal: curl --request PATCH \ | => --url https://api.zoom.us/v2/users/someUserID \ | => --header 'authorization: Bearer MyJWT...' \ | => --header 'content-type: application/json' \ | => --data '{"first_name":"Test","last_name":"Coach","type":"1","job_title":"string","company":"SomeCompany","location":"Berlin"}' ...it works just fine. What would help me debug this if there was some way to see te actual command that the plugin issues. Is there? Thanks, Maximilian Tyrtania _______________________________________________ mbsplugins@monkeybreadsoftware.info mailing list %(list_address)s https://ml-cgn08.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info