© 1999-2024 RingCentral, Inc. All rights reserved.
Privacy Notice
Question
auth code flow - OAuth2::Error: invalid_client: Client authentication is required
Hi,
I am using the standard ruby [ringcentral sdk][1]
Here is how I am trying to authenticate a user using the auth code flow.
Step 1
@client ||= RingCentralSdk::REST::Client.new do |config|
config.server_url = RingCentralSdk::RC_SERVER_SANDBOX
config.app_key = "client_id"
config.app_secret = "client_secret"
config.redirect_url= "redirect_url"
end
Step 2
I provide my consent using a browser with url `@client.authorize_url`
Step 3.
I copy the code returned by the api and try to exchange it with a token like so
token = @client.authorize_code(code)
No matter what I do, I always get this error
{
"error" : "invalid_client",
"errors" : [ {
"errorCode" : "OAU-123",
"message" : "Client authentication is required"
} ],
"error_description" : "Client authentication is required"
}
Here are my Ringcentral app settings
**App Type:**
- REST API App (most common)
**Auth:**
- 3-legged OAuth flow authorization code,
- Server-side web app
**App permissions:**
- VoIP Calling
**Who will be authorized to access your app?**
- This app is public and will be callable via any RingCentral customer.
**What brand partners are available?**
- Make available to all current and future RingCentral carrier and brand partners(recommended)
I have even done several combinations of these settings to no luck
[1]: https://github.com/ringcentral/ringcentral-ruby
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.