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
JWT: error Error: Client authentication is required | Node SDK
Tags: sdk, authentication
Oct 20, 2023 at 10:19am   •   3 replies  •  0 likes
Nick Argyle

Using this code to try and authenticate the SDK.

import { SDK } from "@ringcentral/sdk";

export default async function fetchRingCentralData() {
  const rcsdk = new SDK({
    server: process.env.RC_SERVER,
    appKey: process.env.RC_CLIENTID,
    appSecret: process.env.RC_CLIENTSECRET,
  });
  const platform = rcsdk.platform();
 
  await platform.login({ jwt: process.env.RC_JWT });
}


Receiving error

Error: Client authentication is required 


The app is set up as a JWT app.

cleanshot-2023-10-20-at-131844.png


Can someone help?

3 Answers
answered on Oct 20, 2023 at 2:40pm  

Oh wait, it's in the test data here - https://developers.ringcentral.com/api-reference/provisioningcleanshot-2023-10-20-at-173932.png


 1
answered on Oct 20, 2023 at 2:36pm  

That worked, thank you. I probably pulled that from some other community post's code when debugging something else. Could've sworn I tested what was in the docs, but apparently not. Docs all appear correct.


 0
answered on Oct 20, 2023 at 12:33pm  

The new SDK constructor takes new param object.

const rcsdk = new SDK({
    server: process.env.RC_SERVER,
    clientId: process.env.RC_CLIENTID,
    clientSecret: process.env.RC_CLIENTSECRET,
  });

Can you share the link to the documentation or sample code that shows you the old code. We will fix the documentation accordingly. Thanks.


 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