---
title: "CheckAuthenticationForHost"
method: POST
path: "/gitpod.v1.RunnerService/CheckAuthenticationForHost"
tags: ["gitpod.v1.RunnerService"]
---

# CheckAuthenticationForHost

`POST /gitpod.v1.RunnerService/CheckAuthenticationForHost`

Checks if a user is authenticated for a specific host.

 Use this method to:
 - Verify authentication status
 - Get authentication URLs
 - Check PAT support

 ### Examples

 - Check authentication:

   Verifies authentication for a host.

   ```yaml
   host: "github.com"
   ```

## Request body

- GitpodV1CheckAuthenticationForHostRequest
  - `host` string
  - `runnerId` string, uuid

## Response `200`

Success

- GitpodV1CheckAuthenticationForHostResponse
  - `authenticated` boolean
  - `authenticationUrl` string
  - `patSupported` boolean
  - `scmId` string — scm_id is the unique identifier of the SCM provider
  - `scmName` string — scm_name is the human-readable name of the SCM provider (e.g., "GitHub", "GitLab")
  - `supportsOauth2` GitpodV1CheckAuthenticationForHostResponseAuthenticationMethodOAuth2
    - `authUrl` string — auth_url is the URL where users can authenticate
    - `docsUrl` string — docs_url is the URL to the documentation explaining this authentication method
  - `supportsPat` GitpodV1CheckAuthenticationForHostResponseAuthenticationMethodPersonalAccessToken
    - `createUrl` string — create_url is the URL where users can create a new Personal Access Token
    - `docsUrl` string — docs_url is the URL to the documentation explaining PAT usage for this host
    - `example` string — example is an example of a Personal Access Token
    - `requiredScopes` string[] — required_scopes is the list of permissions required for the Personal Access Token

## Other responses

- `default` — Error

## Changes

- **2025-02-21** `3655d5ad0ac3` — 2 breaking, 10 info
  - the `supportsOauth2` response's property type/format changed from ``/`` to `object`/`` for status `200`
  - the `supportsPat` response's property type/format changed from ``/`` to `object`/`` for status `200`
  - added the optional property `supportsOauth2/authUrl` to the response with the `200` status
  - added the optional property `supportsOauth2/docsUrl` to the response with the `200` status
  - …8 more
- **2025-02-18** `cd6a05ae99d2` — 1 warning
  - removed the optional property `detail` from the response with the `default` status
- **2025-02-18** `f6598ab5d682` — 3 info
  - added the optional property `scmName` to the response with the `200` status
  - added the optional property `supportsOauth2` to the response with the `200` status
  - added the optional property `supportsPat` to the response with the `200` status

[Change history](https://skmtc.dev/gitpod-io/apis/gitpod-v1/changes/gitpod.v1.RunnerService/CheckAuthenticationForHost/post.md)

---

[API](https://skmtc.dev/gitpod-io/apis/gitpod-v1.md) · [All operations](https://skmtc.dev/gitpod-io/apis/gitpod-v1/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/gitpod-io/gitpod-v1/revisions/ca9a49ac7fbb/schema)
