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

KeyDatatypeRequiredDescription
client_idstring(Required) Nylas application client_id (or application id)
providerstringThe 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_uristring(Required) Redirect URI (aka callback URI) of the application
response_typestring(Required) Should be set to code for Nylas OAuth2.0 flow, and set to 'adminconsent' for Microsoft admin consent service account flow.
scopestringA 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.
promptstringOptional 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.
statestringOptional state to be returned after authentication
login_hintstringPrefill 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_typestringIf the exchange token should return refresh_token too. Not suitable for client side or JavaScript apps.
code_challengestringSpecifies a Base64 without padding encoded code_verifier that will be used as a server-side challenge during authorization code exchange.
code_challenge_methodstringSpecifies what method was used to encode a code_verifier that will be used during authorization code exchange.
credential_idstring(Microsoft only) The ID of a previously created Nylas connector credential record. This is only set for Microsoft admin consent service account flow!