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

# Generate Employee or Contractor Dashboard Link

> Generate a link that automatically signs in an employee or contractor and redirects them to their Zeal worker dashboard. This link expires exactly 7 days after generation.

Generate a link that automatically signs in an employee or contractor and redirects them to their Zeal worker dashboard. This link (and dashboard) can be hosted on your custom domain. When a worker logs out of the dashboard, they will be redirected to the Base URL from your Settings page. This link expires exactly 7 days after generation.

<Note>
  This endpoint shares the `/getAuthLink` route with [Generate Company Login Link](/reference/zeal-components/generate-company-login-link). Pass **employeeID** or **contractorID** (not both required, but at least one) to generate a worker dashboard link.

  For worker links, `embedded_page` must be one of `dashboard-worker`, `profile-worker`, or `wallet` (not the company dashboard values). Optional **use\_mfa** and **mfa\_methods** apply only to worker links.
</Note>


## OpenAPI

````yaml openapi/auth-links.json post /getAuthLink
openapi: 3.1.0
info:
  title: zeal-api
  version: '1.0'
servers:
  - url: https://api.zeal.com
security:
  - sec0: []
paths:
  /getAuthLink:
    post:
      summary: Generate Employee or Contractor Dashboard Link
      description: >-
        Generates a link that automatically signs in an employee or contractor
        and redirects them to their Zeal worker dashboard.
      operationId: retrieve-worker-dashboard-link
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - partnerID
                - companyID
              properties:
                partnerID:
                  type: string
                  description: PartnerID of the Zeal Partner
                companyID:
                  type: string
                  description: CompanyID of the company
                employeeID:
                  type: string
                  description: ID of the employee to sign in
                contractorID:
                  type: string
                  description: ID of the contractor to sign in
                embedded_page:
                  type: string
                  description: >-
                    By specifying the particular page you want to embed, the
                    embedded component will show just that page and no sidebar.
                    Can take the values of `dashboard-worker` (worker dashboard
                    home page), `profile-worker` (worker profile page), or
                    `wallet` (worker instant pay wallet).
                  enum:
                    - dashboard-worker
                    - profile-worker
                    - wallet
                use_mfa:
                  type: boolean
                  default: false
                  description: If true, MFA is required when accessing the worker dashboard
                mfa_methods:
                  type: array
                  description: >-
                    If not specified and `use_mfa` is true, both MFA options are
                    shown
                  items:
                    type: string
                    enum:
                      - email
                      - sms
            examples:
              Worker dashboard link:
                value:
                  partnerID: c133ecdere9b3445a2f22Cc258b23445a
                  companyID: fc235f012bae46222ca3444cc2215bcfa
                  employeeID: 507f1f77bcf86cd799439011
                  embedded_page: dashboard-worker
                  use_mfa: true
                  mfa_methods:
                    - email
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    success: true
                    url: >-
                      https://payroll.your-domain.com/auth?accessToken=<accessToken>
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                    default: true
                  url:
                    type: string
                    example: >-
                      https://payroll.your-domain.com/auth?accessToken=<accessToken>
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value:
                    success: false
                    errors:
                      - message: No Partner with this partnerID exists
                        code: 13
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                    default: true
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                          example: No Partner with this partnerID exists
                        code:
                          type: integer
                          example: 13
                          default: 0
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.