Get external auth by ID
GET
CoderSessionTokenheader
Coder-Session-Token<token>externalauth*stringGit Provider ID
Format
stringOK
application/json- response
app_install_url?stringAppInstallURL is the URL to install the app.
app_installable?booleanAppInstallable is true if the request for app installs was successful.
authenticated?booleandevice?booleandisplay_name?stringinstallations?array<>AppInstallations are the installations that the user has access to.
supports_revocation?booleanuser?User is the user that authenticated with the provider.
The samples read CODER_URL and CODER_SESSION_TOKEN: set up your environment.
curl -X GET \ "$CODER_URL/api/v2/external-auth/{externalauth}" \ -H "Coder-Session-Token: $CODER_SESSION_TOKEN"const { CODER_URL, CODER_SESSION_TOKEN } = process.env;const url = `${CODER_URL}/api/v2/external-auth/{externalauth}`;const response = await fetch(url, { method: "GET", headers: { "Coder-Session-Token": CODER_SESSION_TOKEN, },});console.log(response.status, await response.text());import osimport requestsurl = os.environ["CODER_URL"] + "/api/v2/external-auth/{externalauth}"token = os.environ["CODER_SESSION_TOKEN"]response = requests.get( url, headers={ "Coder-Session-Token": token, },)print(response.status_code, response.text)package mainimport ( "fmt" "io" "net/http" "os")func main() { url := os.Getenv("CODER_URL") + "/api/v2/external-auth/{externalauth}" token := os.Getenv("CODER_SESSION_TOKEN") req, err := http.NewRequest(http.MethodGet, url, nil) if err != nil { panic(err) } req.Header.Set("Coder-Session-Token", token) resp, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer resp.Body.Close() out, err := io.ReadAll(resp.Body) if err != nil { panic(err) } fmt.Println(resp.Status, string(out))}Example Response200
{ "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" }}