pydo.harness.create_provider_connect()

Generated on 6 Nov 2026 from pydo version v0.45.0

Usage

client.harness.create_provider_connect(
    provider="github",
    body={
        "force_reconnect": False,
    },
)
Returns JSON Raises HttpResponseError

Description

Starts, or resumes, the one-time login the team uses so a session can act on a provider. github is the provider served today; any other value returns 501. The body is optional. When the team is already connected, status is success and no URL is returned. Otherwise status is requires_authorization and the response carries the URL, verification code, and poll URL for the interactive step. No token or authorization handle is returned.

Parameters

provider string required

Example: github

Provider key. github is the provider served today.

force_reconnect boolean optional

Example: False

When true, start a new login even if the team is already connected.

Request Sample

Show Request Sample
import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

req = {
  "force_reconnect": False
}

resp = client.harness.create_provider_connect(provider="github", body=req)

Response Example

Show Response Example
{
  "provider": "github",
  "status": "requires_authorization",
  "connect_url": "https://example.invalid/connect",
  "poll_url": "https://example.invalid/poll",
  "verification_code": "ABCD-1234",
  "expires_at": "2026-07-27T12:00:00Z"
}

More Information

See /v2/agents/auth/{provider} in the API reference for additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.