---
descriptions:
  client_id: >-
    Identifies the application making the request to the WorkOS server. You can
    obtain your client ID from the [API
    Keys](https://dashboard.workos.com/api-keys) page in the dashboard.
  client_secret: >
    Authenticates the application making the request to the WorkOS server. You
    can obtain your secret key from the [API
    Keys](https://dashboard.workos.com/api-keys) page in the dashboard.
  go:
    error: >-
      The built-in `error` interface, with the `nil` value representing no
      error.
    context: >-
      The [Context](https://pkg.go.dev/context) type provides information about
      the client making the request.
  dotnet:
    cancellation_token: >-
      The [.NET Cancellation
      Token](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=net-7.0)
      can be used to cancel the request.
    task: >-
      An instance of [.NET
      Task](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
      class.
  java:
    builder: A method for building the options object step by step.
reference:
  go:
    - key: ctx
      type: context.Context
      description: (go.context)
    - key: err
      type: error
      description: (go.error)
  dotnet:
    - key: cancellationToken
      type: CancellationToken
      optional: true
      description: (dotnet.cancellation_token)
    - key: Task
      description: (dotnet.task)
  js:
    - url: >-
        https://github.com/workos/authkit-nextjs?tab=readme-ov-file#callback-route
      key: handleAuth
      id: handleAuth
      title: handleAuth()
      patternBefore: \s
      parameters:
        - key: options
          type: object
          unwrap: true
          properties:
            - key: returnPathname
              optional: true
              type: string
            - key: baseURL
              optional: true
              type: string
            - key: onSuccess
              optional: true
              type: function
      returns:
        - key: anonymous
          type: Function
    - url: >-
        https://github.com/workos/authkit-nextjs?tab=readme-ov-file#get-the-current-user-in-a-server-component
      key: getSignInUrl
      id: getSignInUrl
      title: getSignInUrl()
      patternBefore: await
      parameters: []
      returns:
        - key: anonymous
          type: Promise<string>
    - url: >-
        https://github.com/workos/authkit-nextjs?tab=readme-ov-file#get-the-current-user-in-a-server-component
      key: getSignUpUrl
      id: getSignUpUrl
      title: getSignUpUrl()
      patternBefore: await
      parameters: []
      returns:
        - key: anonymous
          type: Promise<string>
    - url: 'https://github.com/workos/authkit-nextjs?tab=readme-ov-file#signing-out'
      key: signOut
      id: signOut
      title: signOut()
      patternBefore: await
      parameters: []
      returns:
        - key: anonymous
          type: Promise<void>
    - url: >-
        https://github.com/workos/authkit-nextjs?tab=readme-ov-file#get-the-current-user-in-a-server-component
      key: withAuth
      id: withAuth
      title: withAuth()
      patternBefore: await
      parameters:
        - key: options
          type: object
          unwrap: true
          properties:
            - key: ensureSignedIn
              optional: true
              type: boolean
      returns:
        - key: anonymous
          type: Promise<UserInfo | NoUserInfo>
    - url: >-
        https://github.com/workos/authkit-nextjs?tab=readme-ov-file#get-the-current-user-in-a-client-component
      key: useAuth
      id: useAuth
      title: useAuth()
      patternBefore: \s
      parameters:
        - key: options
          type: object
          unwrap: true
          properties:
            - key: ensureSignedIn
              optional: true
              type: boolean
      returns:
        - key: anonymous
          type: Promise<UserInfo | NoUserInfo>
    - url: >-
        https://github.com/workos/authkit-nextjs?tab=readme-ov-file#middleware-auth
      key: authkitMiddleware
      id: authkitMiddleware
      title: authkitMiddleware()
      patternBefore: default
      parameters:
        - key: options
          type: object
          unwrap: true
          properties:
            - key: debug
              optional: true
              type: boolean
            - key: redirectUri
              optional: true
              type: string
            - key: middlewareAuth
              optional: true
              type: object
            - key: signUpPaths
              optional: true
              type: array
      returns:
        - key: anonymous
          type: NextMiddleware
    - url: >-
        https://github.com/workos/authkit-nextjs?tab=readme-ov-file#session-refresh-callbacks
      key: authkit
      id: authkit
      title: authkit()
      patternBefore: await
      parameters:
        - key: request
          type: Request
        - key: options
          type: object
          unwrap: true
          properties:
            - key: debug
              optional: true
              type: boolean
      returns:
        - key: anonymous
          type: Promise<AuthKitResponse>
    - url: >-
        https://github.com/workos/authkit-nextjs?tab=readme-ov-file#wrap-your-app-in-authkitprovider
      key: AuthKitProvider
      id: AuthKitProvider
      title: AuthKitProvider
      patternBefore: <
      parameters:
        - key: children
          type: ReactNode
        - key: onSessionExpired
          optional: true
          type: function
originalPath: .tmp-workos-clone/packages/docs/content/reference/index.mdx
---

# Getting started

The WorkOS API gives you everything you need to make your app enterprise-ready. Authenticate users, sync directories, enforce access controls, stream audit logs, and more -- all through a single integration.

The API is organized around REST. It accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

[Sign in](https://dashboard.workos.com/) to see code examples customized with your API keys and data.

```url title="API Base URL"
https://api_workos_com
```

**Not a developer?** You can explore most of WorkOS without writing any code. The [WorkOS Dashboard](https://dashboard.workos.com/) lets you configure SSO connections, manage directories, set up audit log streams, and more -- all from a visual interface.
