Your API documentation only shows this as a form submission but we are trying to do this without user interaction.
I think what I may be missing is the content type for the CreateUserProfileImageRequest attachment.
using C# this is what I tried. Error was "the format of value 'image' is invalid.
byte[] b = System.IO.File.ReadAllBytes(@"C:UserscacareyDocumentsiface.jpg"); Â Â Â Â Â Â CreateUserProfileImageRequest cp = new CreateUserProfileImageRequest(); Â Â Â Â Â Â RingCentral.Attachment att = new Attachment(); Â Â Â Â Â Â att.filename = "iface.jpg"; Â Â Â Â Â Â att.content = b; Â Â Â Â Â Â att.contentType = "image"; Â Â Â Â Â Â cp.image = att; Â Â Â Â Â Â Â Â Â Â Â Â Â var rr = await restClient.Restapi().Account(accountID).Extension(extID).ProfileImage().Post(cp);
