Skip to main content
The First Step
January 15, 2024
Question

jwt

  • January 15, 2024
  • 7 replies
  • 355 views

Hi,

I previously used the password for auth flow of my app.

Now the password is no longer allowed. I switched to json web token, and followed the instructions and the example for python. I obtained the jwt, entered into my code, but:


I am also getting

Unauthorized for this grant type

    7 replies

    PhongVu
    Community Manager
    Community Manager
    January 15, 2024

    Did you login the RingCentral developer portal and change the auth type for your app? And what is the app client id?

    jigarThe First StepAuthor
    The First Step
    January 18, 2024

    Hi Mr. Phong,

    my clinet ID: kAZYBRDmQFWLcRLeKyZTgw

    as for auth type, i see this in App settings:

    1705588331923.png

    PhongVu
    Community Manager
    Community Manager
    January 18, 2024

    So your app is a native Windows desktop app or a Web app? Right now the platform type app is Desktop/Windows. And the app grant type is Authorization code and Password flow.

    I disabled the password flow and enabled the JWT token flow for your app so you should be able to use JWT token now.

    If your app is truly a Windows desktop app, you should think about the way you will deploy your app and how the users can be authenticated. You may find authorization code flow would be more suitable for your app.

    jigarThe First StepAuthor
    The First Step
    January 19, 2024

    My app is a Windows desktop app.

    How long does it take for the change to JWT token flow to take effect?


    Thank you

    jigarThe First StepAuthor
    The First Step
    January 19, 2024

    The JWT auth works now, and my app is working again!

    Thank you for all your help!

    New Participant
    February 7, 2024

    @Phong Vu I am seeing the same error, is there a delay before jwt becomes enabled?

    PhongVu
    Community Manager
    Community Manager
    February 8, 2024

    Should be quick and within an hour. Does the problem still exist? If so, what is the app client id?