News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
Creating/Updating profile image.
Tags: rest api
Sep 30, 2021 at 8:08am   •   2 replies  •  0 likes
Chad Corey

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:\Users\cacarey\Documents\iface.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);
2 Answers
answered on Jul 28, 2022 at 10:27am  

What is the best image size to use for this or how does the scaling option work?


 0
on Jul 28, 2022 at 11:04am   •  0 likes

These are the 3 scaled sizes. So I recommend using the max size 584x584

90x90

195x195

584x584

answered on Sep 30, 2021 at 9:16am  

Try

att.contentType = "image/jpeg";

 0



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us