Question

Trying to migrate a Java application to JWT flow, getting "OAU-251 error - Unauthorized for this grant type"...

  • 23 February 2024
  • 3 replies
  • 218 views

Hi!

I must migrate our Java fax application to jwt and I am currently getting "OAU-251 error - Unauthorized for this grant type" even though I seem to have done what appear to be a trivial change to the SDK to pass it the JWT instead of username and password.

I did not change the "auth" section of the application as it still need to work with the username and password in the Production environment until we are ready to replace it with the version of the application that supports JWT. Is this what is causing the problem?

Is there a solution to this problem or will the application in Production crash as soon as I switch from username and password to JWT?

By the way, why am I unable to answer "Do you intend to promote this app in the RingCentral App Gallery? *" and forced to publish our app if I want to submit the page?

Thank you!

Nick


3 replies

Userlevel 1

When you change the JWT flow from a password flow app, the password flow will be disabled immediately, and normally the JWT token flow will take effect in about 5 mins. However, I have heard from some developers that they faced a longer time (up to hours). I cannot track those apps and found the root cause of the issue but it is quite rare.

Can you try again with your JWT token to see if it works now?

To your concern about the app in production, if you want to be very sure that the app will work continuously, please give me the app client id, I will enable the JWT and keep the password flow for you until we completely disable password flow.

If you are not sure about the question about prompting your app on the app gallery, just say no. You can provide the metadata and submit your app for listing on the app gallery later if you want.

Hi!

It does not make any difference, I still get the same error message.

But then from your answer I gather that it is normal right if I did not switch to JWT instead of password flow in the app configuration because I do not want to disrupt the app in Production.

I believe the app client id is NQn2UV38ShCUQbtSmF8Qlg, please do as you said and enable both flow please...

As for the question about publishing, the question is disabled so I cannot answer no and I am forced to fill in the fields when I submit because of this it seems...

Thank you and have a nice day!

Nick

Userlevel 1

JWT flow is enabled for your app (NQn2UV38ShCUQbtSmF8Qlg). Password flow is also still enabled. Please change your code and use the JWT as soon as you can before the deadline.

Is this app (NQn2UV38ShCUQbtSmF8Qlg) the app you are talking about the promotion on the app gallery?

Reply