question

Neil Hewitt avatar image
Neil Hewitt asked Phong Vu commented

503 - Service Temporarily Unavailable C# SDK

Attempting to do a basic Auth using the C# SDK (RingCentral.Net -Version 5.17.0)

RestClient rc = new RestClient("RC_CLIENT_ID", RC_CLIENT_SECRET, RC_SERVER_URL)
await rc.Authorize(JWT);

I am receiving the below error.

Response:
StatusCode: 503, ReasonPhrase: 'Service Temporarily Unavailable', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
{
  Connection: keep-alive
  Date: Thu, 18 Aug 2022 14:04:00 GMT
  Server: nginx
  Content-Length: 190
  Content-Type: text/html
}
Content: <html>
<head><title>503 Service Temporarily Unavailable</title></head>
<body>
<center><h1>503 Service Temporarily Unavailable</h1></center>
<hr><center>nginx</center>
</body>
</html>

This seems to have been going on for most of today? Are you aware ?

Thanks.

sdk
1 |3000

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

Phong Vu avatar image
Phong Vu answered
RestClient("RC_CLIENT_ID", RC_CLIENT_SECRET, RC_SERVER_URL)

Why the RC_CLIENT_ID is quoted? Did you put the client id directly in place, or it's just a mistake when you posted your question?

1 |3000

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

Neil Hewitt avatar image
Neil Hewitt answered Neil Hewitt edited

Sorry it was when i was typing it out in the question above and removing credentials. The error is still present the example above should not have the quotes around.

RestClient(RC_CLIENT_ID, RC_CLIENT_SECRET, RC_SERVER_URL)

Is the sandbox experiencing issues ? TIA.

3 comments
1 |3000

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

Phong Vu avatar image Phong Vu ♦♦ commented ·

No, sandbox is working normally.

0 Likes 0 ·
Neil Hewitt avatar image Neil Hewitt Phong Vu ♦♦ commented ·

Any idea why just a basic authorisation would return a 503 ? I mean id expect an auth failure or something... Just not a 503 for whats seems to be a basic command.

0 Likes 0 ·
Neil Hewitt avatar image Neil Hewitt Neil Hewitt commented ·

@Phong Vu

I have inspected the SDKs request which generates

Endpoint POST

https://service.devtest.ringcentral.com/restapi/oauth/token

headers

X-User-Agent: Unknown/0.0.1 RingCentral.Net/5.17.0
Authorization: Basic xxxxxxxxxxx==
Content-Type: application/x-www-form-urlencoded
Host: service.devtest.ringcentral.com
Content-Length: 789
Expect: 100-continue
Connection: Keep-Alive

body

grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer&assertion=xxxxxxxxxxx

does the above look as expected ? Please note i have replaced the bearer and Assertation with

xxxxxxxxxxx

Any help is really appreciated as this is basic functionality and literally 2 lines of code which were taken directly from a previous post on this topic.

Thanks in advance.

0 Likes 0 ·
Neil Hewitt avatar image
Neil Hewitt answered Phong Vu commented

@Phong Vu I am re-visiting this integration after reading various forum topics. In the code above my assumption is the URL should read "https://platform.devtest.ringcentral.com/restapi/oauth/token" rather than "https://service.devtest.ringcentral.com/restapi/oauth/token"

However, i seem to be getting timeouts from the devtest endpoints.

I am hopeful that these timeouts are a know temporary issue and not related to anything i am doing?

2 comments
1 |3000

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

Phong Vu avatar image Phong Vu ♦♦ commented ·

The sandbox environment is currently down due to a power outage incident yesterday evening. The team is working on it right now. It may still take some time to get it back to normal.

0 Likes 0 ·
Phong Vu avatar image Phong Vu ♦♦ commented ·

I just run some test. It seems the issue is fixed and the sandbox operation is back to normal.

0 Likes 0 ·

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