Id = 8, Status = WaitingForActivation, Method = "{null}", Result = "{Not yet computed}"
Tags: getting started
Aug 23, 2017 at 2:43am • 4 replies • 0 likes
sprout-system
When i try to get access token getting this issue.
I'm using below code:
RestClient rc = null;
if (!string.IsNullOrWhiteSpace(Config.Instance.server))
{
rc = new RestClient(Config.Instance.appKey, Config.Instance.appSecret, Config.Instance.server);
}
else
{
rc = new RestClient(Config.Instance.appKey, Config.Instance.appSecret, Config.Instance.production.Value);
}
await rc.Authorize(Config.Instance.username, Config.Instance.extension, Config.Instance.password);
Assert.NotNull(rc.token.access_token);
4 Answers
Thank for your response, i am also use this way, but not get the token throw the 400 Bad Request error, i pasted my code changes
public RestClientFixture()
{
if (!string.IsNullOrWhiteSpace(Config.Instance.server))
{
rc = new RestClient(Config.Instance.appKey, Config.Instance.appSecret, false);
}
else
{
rc = new RestClient(Config.Instance.appKey, Config.Instance.appSecret, false);
}
var temp = rc.Authorize(Config.Instance.username, Config.Instance.extension, Config.Instance.password).Result;
}
i refer this link to implement this concept , https://github.com/grokify/ringcentral-demos-oauth/tree/master/csharp-nancy/
but still i am not getting,
Authorize method return below error,
{"Request to https://platform.devtest.ringcentral.com/restapi/oauth/token failed with status code 400 (Bad Request)."}
even i download multiple source code to implement this concept using c# but all are return same issue. i don't know where i missing. Please give idea to resolve this issue.
public RestClientFixture()
{
if (!string.IsNullOrWhiteSpace(Config.Instance.server))
{
rc = new RestClient(Config.Instance.appKey, Config.Instance.appSecret, false);
}
else
{
rc = new RestClient(Config.Instance.appKey, Config.Instance.appSecret, false);
}
var temp = rc.Authorize(Config.Instance.username, Config.Instance.extension, Config.Instance.password).Result;
}
i refer this link to implement this concept , https://github.com/grokify/ringcentral-demos-oauth/tree/master/csharp-nancy/
but still i am not getting,
Authorize method return below error,
{"Request to https://platform.devtest.ringcentral.com/restapi/oauth/token failed with status code 400 (Bad Request)."}
even i download multiple source code to implement this concept using c# but all are return same issue. i don't know where i missing. Please give idea to resolve this issue.
0
I think the Assert library doesn't support async await code although I am don't know which unit testing library you are using. Please change to var token = rc.Authorize(Config.Instance.username, Config.Instance.extension, Config.Instance.password).Result; and try again.
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