Legacy Dev Forum Posts

 View Only

Sign Up

Unauthorized Client, but is authorized?

  • 1.  Unauthorized Client, but is authorized?

    Posted 06-05-2025 18:33

    Blake_Peavy | 2025-02-26 21:58:16 UTC | #1

    I'm using this redirect for login: $"https://login.usw2.pure.cloud/oauth/authorize?client_id={clientId}&response_type=code&redirect_uri={decodedUri}";

    I get ?error=unauthorized_client from the response.

    Reusing some of this for my test: https://github.com/MyPureCloud/quick-hits-dotnet/blob/main/authorization/oauth-auth-code-guide/Controllers/HomeController.cs

    The clientId is valid. It's setup as a token implicit grant. The user logging in has oauth:client:authorize permission. The oauth scope has oauth and users. Redirect is in the redirect AuthorizedUris box.

    Am I missing anything?

    Goal is to get the logged in user.


    Jerome.Saint-Marc | 2025-02-27 06:46:17 UTC | #2

    Hello,

    The url you are using does not correspond to an OAuth Client defined with Token Implicit Grant Type.

    Such url (with response_type=code) corresponds to an Authorization Code Grant flow. Same with the C# code. You have to create an OAuth Client with Grant Type set to: Code Authorization/PKCE.

    Regards,


    system | 2025-03-29 06:46:18 UTC | #3

    This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 31935