Hosted OAuth - Authorization Request
GET {{baseUrl}}/v3/connect/auth?client_id={{application_id}}&provider={{provider}}&redirect_uri={{redirect_uri}}&response_type={{response_type}}&login_hint={{email}}
The initial OAuth 2.0 authorization request which supports the authorization code flow in addition to optional PKCE for client side only applications. Learn more: - Hosted OAuth with Access token - Hosted OAuth with Access token and PKCE
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
client_id | string | (Required) Nylas application client_id (or application id) | |
provider | string | The Connector provider type that you already had set up with Nylas for this application. If not set, the user is directed to the Hosted Login screen and prompted to select a provider. | |
redirect_uri | string | (Required) Redirect URI (aka callback URI) of the application | |
response_type | string | (Required) Should be set to code for Nylas OAuth2.0 flow, and set to 'adminconsent' for Microsoft admin consent service account flow. | |
scope | string | A space-delimited list of scopes that identify the resources that your application could access on the user's behalf. If no scope is given, all of the default connector's scopes are used. | |
prompt | string | Optional prompt for Hosted Login screen. If used can accept multiple values separated by a comma without spaces in between, also order of prompts effects the UI of the Hosted Login screen. If provider is set the user gets redirected to the provider screen directly and the prompt is ignored. | |
state | string | Optional state to be returned after authentication | |
login_hint | string | Prefill the login name (usually email) during authorization flow. If a Grant for the provided email already exists, a Grant's re-auth will automatically be initiated. | |
access_type | string | If the exchange token should return refresh_token too. Not suitable for client side or JavaScript apps. | |
code_challenge | string | Specifies a Base64 without padding encoded code_verifier that will be used as a server-side challenge during authorization code exchange. | |
code_challenge_method | string | Specifies what method was used to encode a code_verifier that will be used during authorization code exchange. | |
credential_id | string | (Microsoft only) The ID of a previously created Nylas connector credential record. This is only set for Microsoft admin consent service account flow! |