Why return "connection is disabled"?

I’m a Japanese.
So, maybe my english is bad. Sorry.


I want to separate Auth0’s Application “Development” and “production”.
The endpoint uses the following URL.

https://[ApplicationName].auth0.com/dbconnections/signup

Sign up was completed normally, and data was also inserted on Auth0 with a Connection different from the product.

However, when trying to get access token the following error will be returned.

{
  "error": "invalid_request"
  "error_description": "connection is disabled (client_id: CLIENT_ID - connection: APP-PRODUCTION)"
}

Endpoint: https://ai-con.auth0.com/oauth/token

I am sending the following data at Guzzle.

[
  "form_params" => [
    "grant_type" => "password"
    "client_id" => "CLIENT_ID"
    "client_secret" => "CLIENT_SECRET"
    "username" => "email@address"
    "password" => "password_drowssap"
    "audience" => "https://[[ApplicationName]].auth0.com/api/v2/"
    "connection" => "APP-DEV"
    "scope" => "openid"
  ]
  "header" => [
    "content-type" => "application/json"
  ]
]

In the error message “Connection: APP - PRODUCTION” is written,
I am sending Connection as “APP - DEV”.

How can we solve this?

In addition, Production users can register and log in properly.

Thank you.

1 Like

Is the connection APP-DEV actually enabled for the client CLIENT_ID?

1 Like

Thank you for your reply.

Is the connection APP-DEV actually enabled for the client CLIENT_ID ?

Yes!
And I solved this question.

I must send "grant_type" => "http://auth0.com/oauth/grant-type/password-realm" not password.

Thank you!

3 Likes

Thank you, this saved me a lot of time! Also note realm becomes a required parameter after this change. It maps to a connection name.

https://auth0.com/docs/api-auth/tutorials/password-grant

1 Like

Hi @neto-tim,

Welcome to the Community! We appreciate your input, thanks for chiming in with additional information!

Thanks,
Dan

1 Like

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