question

andrew-forsyth12865 avatar image
andrew-forsyth12865 asked andrew-forsyth12865 answered

URL encoding of tilde (~) sign

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


rest api
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

anton-nikitin avatar image
anton-nikitin answered
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


1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

andrew-forsyth12865 avatar image
andrew-forsyth12865 answered
Ah. Yes. Thanks.
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys