Resource Owner Password Credentials Grant

This endpoint exchanges the resource owner's credentials for an access token and it is highly advised to be used from secure environments such as your application's backend.

Request Body

client_id
string
Required

Your client id.

Make sure your client has password grant type enabled in Dashboard > Clients > Details > Grant Types

client_secret
string
Required

Your client's secret

grant_type
string
Required

For Resource Owner Credentials Grant this must be set to password

Value: password

password
string
Required

End-User's credentials in plain text.

username
string
Required

End-User's identifier.

NOTE: This field may be misleading as we didn't want to override protocol specification. Even though this field is named as username it may not be End-User's username if identifier is set to different field from username, such as email, phone_number, etc.

audience
string

Audience of to be generated access token.

Make sure your client is granted access to use this audience from Dashboard > Resources > [Your Resource] > Clients

connection
string

If provided user credentials will be checked from the provided connection.

NOTE: this will override default connection set in dashboard.

identifier
string

Field name to look up user.

Make sure to set username field according to this value.
For ex: If identifier=email set username to End-User's email address.

Default Value: "email"

scope
string

Space separated permissions (scopes) list.

Make sure your client has access to the scopes for your resource from Dashboard > Resources > [Your Resource] > Clients.

POST
/oauth2/token
1
2
3
4
5
6
7
8
9
10
11
12
Loading...
Response:
200
Loading...

Response Body Schema

access_token
string
Required

Access token value in JWT string

expires_in
number
Required

Access token's expiration in seconds

id_token
string

ID token value in JWT string, if generated.

refresh_token
string

Refresh token value, if generated.

scope
string

Final scopes granted to access token as space separated strings.