## 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" ``` ### Body Parameters - `host: optional string` - `runnerId: optional string` ### Returns - `authenticated: optional boolean` - `authenticationUrl: optional string` - `patSupported: optional boolean` - `scmId: optional string` scm_id is the unique identifier of the SCM provider - `scmName: optional string` scm_name is the human-readable name of the SCM provider (e.g., "GitHub", "GitLab") - `supportsOauth2: optional object { authUrl, docsUrl }` supports_oauth2 indicates that the host supports OAuth2 authentication - `authUrl: optional string` auth_url is the URL where users can authenticate - `docsUrl: optional string` docs_url is the URL to the documentation explaining this authentication method - `supportsPat: optional object { createUrl, docsUrl, example, requiredScopes }` supports_pat indicates that the host supports Personal Access Token authentication - `createUrl: optional string` create_url is the URL where users can create a new Personal Access Token - `docsUrl: optional string` docs_url is the URL to the documentation explaining PAT usage for this host - `example: optional string` example is an example of a Personal Access Token - `requiredScopes: optional array of string` required_scopes is the list of permissions required for the Personal Access Token ### Example ```http curl https://app.gitpod.io/api/gitpod.v1.RunnerService/CheckAuthenticationForHost \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $GITPOD_API_KEY" \ -d '{}' ``` #### Response ```json { "authenticated": true, "authenticationUrl": "authenticationUrl", "patSupported": true, "scmId": "scmId", "scmName": "scmName", "supportsOauth2": { "authUrl": "authUrl", "docsUrl": "docsUrl" }, "supportsPat": { "createUrl": "createUrl", "docsUrl": "docsUrl", "example": "example", "requiredScopes": [ "string" ] } } ```