Generate access tokens with custom permissions with no frontend

I am trying to generate access tokens. I have no frontend, only backend.
I have created an API, set roles/users/persmissions. And I can use the test connection option to login, but the test connection doesn’t generate a token.
I can generate one with my gmail account, but not with the users I created.
The token generated by my gmail account, is somehow faulty or not working. As it doesn’t get decoded properly by jwt.decode.
I tried a curl method and I keep getting an error.curl --request POST --url ‘https://fsnd-sami.auth0.com/oauth/token’ --header ‘content-type: application/x-www-form-urlencoded’ --data 'grant_type=password&username=exec-producer@casting.com&password=Test1234&audience=http://localhost:5000&client_id=I5gUe4LfoQY53aKDfYWczTOTou1v3oAd&client_secret=sLGRl2WA6MPSM1zhoh4XQuX3T7riTq_c5BcjxP9OMgAiShQG0fngJrBIJl74Q8JT’{“error”:“server_error”,“error_description”:"Authorization server not configured with default connection."}I tried the link method:https://fsnd-sami.auth0.com/login?state=g6Fo2SBmRXdSLWpDSzhmRVZzTGRWV3NMbzk0RzZBcklUQ1MzdKN0aWTZIE9meGhRc0FCb01DM1dWc29XTEhqak01TWljcVd1NnFao2NpZNkgSTVnVWU0TGZvUVk1M2FLRGZZV2N6VE9Ub3UxdjNvQWQ&client=I5gUe4LfoQY53aKDfYWczTOTou1v3oAd&protocol=oauth2&grant_type=password&username=assistant%40casting.com&password=Test1234&audience=http%3A%2F%2Flocalhost%3A5000&scope=SCOPE&client_secret=sLGRl2WA6MPSM1zhoh4XQuX3T7riTq_c5BcjxP9OMgAiShQG0fngJrBIJl74Q8JT&response_type=token&redirect_uri=http%3A%2F%2Flocalhost%3A5000 And it worked one time, and ten I kept getting this following error:access_denied: Password login via OIDC-conformant clients with externally-hosted login pages is unsupported. Alternatively, login could have been initiated from the wrong place (e.g., a bookmark).

Hi!

You can set a default connection in the tenant settings of the Auth0 Dashboard.

The steps are documented here: https://auth0.com/docs/api-auth/tutorials/password-grant
There is also a section that explains using realm support if you need to specify different connections

You will not be able to call the /login endpoint directly, it is meant for universal login from the Auth0 /Authorize endpoint.

Regards,

I have set the connection to password and set the directory to username-password-connection.