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
URL encoding of tilde (~) sign
Tags: rest api
Nov 27, 2018 at 11:15am   •   2 replies  •  0 likes
andrew-forsyth

I'm setting up an API connection to our management dashboard tool. It has strict URL encoding rules to poll APIs. So I can't ask it to poll:


https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/


Because the tilde should be escaped to be:


https://platform.devtest.ringcentral.com/restapi/v1.0/account/%7e/


However if I try this URL (or without the trailing forward slash), Ringcentral returns a 401 error.


Any ideas?


Thanks,

Andrew


2 Answers
answered on Nov 27, 2018 at 12:03pm  
Ah. Yes. Thanks.

 0
answered on Nov 27, 2018 at 11:40am  
Andrew,

according to RFC 2396 (https://tools.ietf.org/html/rfc2396) :

2.3. Unreserved Characters
   Data characters that are allowed in a URI but do not have a reserved
purpose are called unreserved. These include upper and lower case
letters, decimal digits, and a limited set of punctuation marks and
symbols. unreserved = alphanum | mark mark = "-" | "_" | "." | "!" | "~" | "*" | "'" | "(" | ")" Unreserved characters can be escaped without changing the semantics
of the URI, but this should not be done unless the URI is being used 
   in a context that does not allow the unescaped character to appear.
At the same time we do support encoded tilde character. Your issue is most likely not because of a tilde escaping but due to missing or invalid access token provided in "Authorization" header.

Here is the example of successful request I could send:

GET https://platform.devtest.ringcentral.com/restapi/v1.0/account/%7e HTTP/1.1 Accept-Encoding: gzip,deflate Authorization: Bearer SUFEMD...VKaUxDZ1lyS3pRVHRVVHBRfEFB



 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