> ## Documentation Index
> Fetch the complete documentation index at: https://morphik.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Initiate Auth Url

> Return the provider's *authorization_url* for the given connector.

The method mirrors the logic of the `/auth/initiate` endpoint but sends a
JSON payload instead of a redirect so that browsers can stay on the same
origin until they intentionally navigate away.

For OAuth-based connectors, this returns authorization_url.
For manual credential connectors, this returns the credential form specification.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/morphik/openapi.documented.yml get /ee/connectors/{connector_type}/auth/initiate_url
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /ee/connectors/{connector_type}/auth/initiate_url:
    get:
      tags:
        - EE - Connectors
      summary: Get Initiate Auth Url
      description: >-
        Return the provider's *authorization_url* for the given connector.


        The method mirrors the logic of the `/auth/initiate` endpoint but sends
        a

        JSON payload instead of a redirect so that browsers can stay on the same

        origin until they intentionally navigate away.


        For OAuth-based connectors, this returns authorization_url.

        For manual credential connectors, this returns the credential form
        specification.
      operationId: >-
        get_initiate_auth_url_ee_connectors__connector_type__auth_initiate_url_get
      parameters:
        - name: connector_type
          in: path
          required: true
          schema:
            type: string
            title: Connector Type
        - name: app_redirect_uri
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: App Redirect Uri
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/ManualCredentialsAuthResponse'
                  - $ref: '#/components/schemas/OAuthAuthResponse'
                title: >-
                  Response Get Initiate Auth Url Ee Connectors  Connector Type 
                  Auth Initiate Url Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Morphik from 'morphik';


            const client = new Morphik({
              apiKey: process.env['MORPHIK_API_KEY'], // This is the default and can be omitted
            });


            const response = await
            client.ee.connectors.auth.getInitiateAuthURL('connector_type');


            console.log(response);
        - lang: cURL
          source: >-
            curl
            https://api.morphik.ai/ee/connectors/$CONNECTOR_TYPE/auth/initiate_url
            \
                -H "Authorization: Bearer $MORPHIK_API_KEY"
components:
  schemas:
    ManualCredentialsAuthResponse:
      properties:
        auth_type:
          type: string
          title: Auth Type
        required_fields:
          items:
            $ref: '#/components/schemas/CredentialField'
          type: array
          title: Required Fields
        instructions:
          anyOf:
            - type: string
            - type: 'null'
          title: Instructions
      type: object
      required:
        - auth_type
        - required_fields
      title: ManualCredentialsAuthResponse
    OAuthAuthResponse:
      properties:
        authorization_url:
          type: string
          title: Authorization Url
      type: object
      required:
        - authorization_url
      title: OAuthAuthResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CredentialField:
      properties:
        name:
          type: string
          title: Name
        label:
          type: string
          title: Label
        description:
          type: string
          title: Description
        type:
          type: string
          title: Type
        required:
          type: boolean
          title: Required
        options:
          anyOf:
            - items:
                $ref: '#/components/schemas/CredentialFieldOption'
              type: array
            - type: 'null'
          title: Options
      type: object
      required:
        - name
        - label
        - description
        - type
        - required
      title: CredentialField
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    CredentialFieldOption:
      properties:
        value:
          type: string
          title: Value
        label:
          type: string
          title: Label
      type: object
      required:
        - value
        - label
      title: CredentialFieldOption

````