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
OAU-251 - JWT - Unauthorized for this grant type
Tags: authentication
Nov 11, 2022 at 3:52pm   •   2 replies  •  0 likes
Anand Patel

Created JWT and trying to use this.


App I am using is the only App in Production for sending SMS.

Using Rest Client with C#


restClient = new RestClient(
                "RC_CLIENT_ID",
                "RC_CLIENT_SECRET",
                "https://platform.ringcentral.com");
var jwt = @"REMOVED FOR SECURITY";
var tokenInfo = await restClient.Authorize(jwt);
Response:
StatusCode: 400, ReasonPhrase: 'Bad Request', Version: 1.1, Content: System.Net.Http.HttpConnectionResponseContent, Headers:
{
  Server: nginx
  Date: Fri, 11 Nov 2022 23:44:07 GMT
  Connection: keep-alive
  Vary: Origin
  Vary: Access-Control-Request-Method
  Vary: Access-Control-Request-Headers
  RCRequestId: bbd807d0-621a-11ed-884a-0050568d7d0d
  Pragma: no-cache
  Cache-Control: no-store
  AceRoutingKey: iad41-c01-ace01-f7db789cc-xzsz9_10.120.155.210
  RoutingKey: SJC01P13
  Content-Type: application/json
  Content-Length: 201
  Content-Language: en
}
Content: {
  "error" : "unauthorized_client",
  "errors" : [ {
    "errorCode" : "OAU-251",
    "message" : "Unauthorized for this grant type"
  } ],
  "error_description" : "Unauthorized for this grant type"
}

Request:
Method: POST, RequestUri: 'https://platform.ringcentral.com/restapi/oauth/token', Version: 1.1, Content: System.Net.Http.FormUrlEncodedContent, Headers:
{
  X-User-Agent: Unknown/0.0.1 RingCentral.Net/5.18.0
  Authorization: Basic REMOVED FOR SECURITY
  traceparent: 00-e7fec9cf088e5a8849d254c03b4eea14-a20c80fc5b02ce2f-00
  Content-Type: application/x-www-form-urlencoded
  Content-Length: 770
}
Content: grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer&assertion=REMOVED-FOR-SECURITY
2 Answers
answered on Nov 21, 2022 at 5:25pm  

Hi @Anand Patel, this could have something to do with your app settings, please submit a case here along with your client id

https://developers.ringcentral.com/support/create-case for further investigation on the error message.


 0
answered on Nov 14, 2022 at 6:28am  

What is the platform type of your app? Or what is the app client id?


 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