DEMO A showcase of hev ask⌘K agentic search — running on Coder's real docs. Unaffiliated with Coder; not the official documentation. Official Coder docs ↗ Add ask to your docs ↗
Documentation › Git

Git

Get user external auths

Code samples

# Example request using curl
curl -X GET http://coder-server:8080/api/v2/external-auth \
  -H 'Accept: application/json' \
  -H 'Coder-Session-Token: API_KEY'

GET /api/v2/external-auth

Example responses

200 Response

{
  "authenticated": true,
  "created_at": "2019-08-24T14:15:22Z",
  "expires": "2019-08-24T14:15:22Z",
  "has_refresh_token": true,
  "provider_id": "string",
  "updated_at": "2019-08-24T14:15:22Z",
  "validate_error": "string"
}

Responses

StatusMeaningDescriptionSchema
200OKOKcodersdk.ExternalAuthLink

To perform this operation, you must be authenticated. Learn more.

Get external auth by ID

Code samples

# Example request using curl
curl -X GET http://coder-server:8080/api/v2/external-auth/{externalauth} \
  -H 'Accept: application/json' \
  -H 'Coder-Session-Token: API_KEY'

GET /api/v2/external-auth/{externalauth}

Parameters

NameInTypeRequiredDescription
externalauthpathstring(string)trueGit Provider ID

Example responses

200 Response

{
  "app_install_url": "string",
  "app_installable": true,
  "authenticated": true,
  "device": true,
  "display_name": "string",
  "installations": [
    {
      "account": {
        "avatar_url": "string",
        "id": 0,
        "login": "string",
        "name": "string",
        "profile_url": "string"
      },
      "configure_url": "string",
      "id": 0
    }
  ],
  "supports_revocation": true,
  "user": {
    "avatar_url": "string",
    "id": 0,
    "login": "string",
    "name": "string",
    "profile_url": "string"
  }
}

Responses

StatusMeaningDescriptionSchema
200OKOKcodersdk.ExternalAuth

To perform this operation, you must be authenticated. Learn more.

Code samples

# Example request using curl
curl -X DELETE http://coder-server:8080/api/v2/external-auth/{externalauth} \
  -H 'Accept: application/json' \
  -H 'Coder-Session-Token: API_KEY'

DELETE /api/v2/external-auth/{externalauth}

Parameters

NameInTypeRequiredDescription
externalauthpathstring(string)trueGit Provider ID

Example responses

200 Response

{
  "token_revocation_error": "string",
  "token_revoked": true
}

Responses

StatusMeaningDescriptionSchema
200OKOKcodersdk.DeleteExternalAuthByIDResponse

To perform this operation, you must be authenticated. Learn more.

Get external auth device by ID

Code samples

# Example request using curl
curl -X GET http://coder-server:8080/api/v2/external-auth/{externalauth}/device \
  -H 'Accept: application/json' \
  -H 'Coder-Session-Token: API_KEY'

GET /api/v2/external-auth/{externalauth}/device

Parameters

NameInTypeRequiredDescription
externalauthpathstring(string)trueGit Provider ID

Example responses

200 Response

{
  "device_code": "string",
  "expires_in": 0,
  "interval": 0,
  "user_code": "string",
  "verification_uri": "string"
}

Responses

StatusMeaningDescriptionSchema
200OKOKcodersdk.ExternalAuthDevice

To perform this operation, you must be authenticated. Learn more.

Post external auth device by ID

Code samples

# Example request using curl
curl -X POST http://coder-server:8080/api/v2/external-auth/{externalauth}/device \
  -H 'Coder-Session-Token: API_KEY'

POST /api/v2/external-auth/{externalauth}/device

Parameters

NameInTypeRequiredDescription
externalauthpathstring(string)trueExternal Provider ID

Responses

StatusMeaningDescriptionSchema
204No ContentNo Content

To perform this operation, you must be authenticated. Learn more.

esc