The client is not authorized to use the provided grant type. Configured grant types:

Hello there. I have been struggling for the whole day trying to make this work. How do I get an access token on my OktaWeb application using just this endpoint? /v1/token? On my native app application it works. But did not work on OktaWeb application. Is this only applicable for native app? It seems the collection is not updated.

Here is the error

{
    "error": "unauthorized_client",
    "error_description": "The client is not authorized to use the provided grant type. Configured grant types: [client_credentials, refresh_token, authorization_code, implicit]."
}

Any help? Thanks

If you have client_credentials then you can get the token from /v1/token but it won’t represent user context, as it’s designed for m2m interface

oh… So its machine to machine? I have the credentials. That means the only way to get access token without sign in ui is via Native app application only? The reason I started this thread is I wanted to make a test automation on an external API that use Okta Sign in. To test the external API I needed that access token. It seems impossible I guess.

As I said, you can get access token using client_credentials flow - https://developer.okta.com/docs/reference/api/oidc/#token But as I said, it won’t have user context, it’s still a valid access token though, which can be validated by API side.

I suggest you to try and see if there are any issues with this approach

1 Like

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