Access Denied for any call

Hello, I’ve created a Native application with grant type Resource Owner Password and I’m trying to get an access token but I’m getting the following

curl --request POST
–url https://tryninja.okta.com/oauth2/default/v1/token
–header ‘accept: application/json’
–header ‘authorization: Basic MG9hYzI5cXVxQUR6VndCbjEzNTY6eHV0bTlNdnRVTkdaUGVhUm9EQTZIWU9manlvd3NjZmJUUk9BSjVkUA==’
–header ‘content-type: application/x-www-form-urlencoded’
–data ‘grant_type=password&username=burner.1022117e@tryninja.io&password=123456789Ab&scope=openid’

{“error”:“access_denied”,“error_description”“The requested feature is not enabled in this environment.”}

I’ve added the user to the application and everything is setup to default

Hi @mcadenas

The error occurs because you are trying to access an endpoint for a custom authorization server and, based on the error, the feature is not enabled. This feature is called API Access Management.

Can you try using the Okta authorization server at https://tryninja.okta.com/oauth2/v1/token? You can find all the endpoints for this authorization server here.

Hi @dragos thanks for the answer, it all seems to be working now

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