---
descriptions:
  logout:
    session_id: >-
      The ID of the session that is ending. This can be extracted from the `sid`
      claim of the access token.
reference:
  curl:
    - key: get_logout_url
      id: get_logout_url
      url: /reference/authkit/logout/get-logout-url
      title: /user_management/sessions/logout
      type: GET
      parameters:
        - key: session_id
          type: string
          description: (logout.session_id)
        - key: return_to
          optional: true
          type: string
          description: (logout.return_to)
      returns:
        - key: url
          type: string
          description: (logout.url)
  js:
    - key: getLogoutUrl
      id: get_logout_url
      url: /reference/authkit/logout/get-logout-url
      title: userManagement.getLogoutUrl()
      parameters:
        - key: options
          type: object
          unwrap: true
          properties:
            - key: sessionId
              type: string
              description: (logout.session_id)
            - key: returnTo
              optional: true
              type: string
              description: (logout.return_to)
      returns:
        - key: url
          type: string
          description: (logout.url)
  go:
    - key: GetLogoutUrl
      id: get_logout_url
      url: /reference/authkit/logout/get-logout-url
      title: usermanagement.GetLogoutUrl()
      parameters:
        - (ctx)
        - key: opts
          type: usermanagement.GetLogoutURLOpts
          unwrap: true
          properties:
            - key: SessionID
              type: string
              description: (logout.session_id)
            - key: ReturnTo
              optional: true
              type: string
              description: (logout.return_to)
      returns:
        - key: response
          type: string
          description: (logout.url)
        - (err)
  ruby:
    - key: get_logout_url
      id: get_logout_url
      url: /reference/authkit/logout/get-logout-url
      title: UserManagement.get_logout_url()
      parameters:
        - key: session_id
          type: string
          description: (logout.session_id)
        - key: return_to
          optional: true
          type: string
          description: (logout.return_to)
      returns:
        - key: url
          type: string
          description: (logout.url)
  java:
    - key: getLogoutUrl
      id: get_logout_url
      url: /reference/authkit/logout/get-logout-url
      title: userManagement.getLogoutUrl()
      parameters:
        - key: sessionId
          type: string
          description: (logout.session_id)
        - key: returnTo
          optional: true
          type: string
          description: (logout.return_to)
      returns:
        - key: url
          type: string
          description: (logout.url)
  python:
    - key: get_logout_url
      id: get_logout_url
      url: /reference/authkit/logout/get-logout-url
      title: user_management.get_logout_url()
      parameters:
        - key: session_id
          type: str
          description: (logout.session_id)
        - key: return_to
          optional: true
          type: str
          description: (logout.return_to)
      returns:
        - key: url
          type: str
          description: (logout.url)
  php:
    - key: get_logout_url
      id: get_logout_url
      url: /reference/authkit/logout/get-logout-url
      title: $userManagement->getLogoutUrl()
      parameters:
        - key: session_id
          type: string
          description: (logout.session_id)
        - key: return_to
          optional: true
          type: string
          description: (logout.return_to)
      returns:
        - key: url
          type: string
          description: (logout.url)
originalPath: >-
  .tmp-workos-clone/packages/docs/content/reference/authkit/logout/get-logout-url.mdx
---

# Get logout URL

<CodeBlock referenceId="get_logout_url">
  <CodeBlockTab title="Request" file="get-logout-url-request" />
  <CodeBlockTab title="Response" file="get-logout-url-response" />
</CodeBlock>
