GET /v1/dashboard/github/callback

GitHub's redirect back. Accepts only the owner's GitHub user id. On success it sets the session cookie and redirects to the dashboard. Any failure redirects to the dashboard with signin=failed and counts against the address.

Auth. None. Anyone can call this route.

Parameters

NameInTypeRequiredDescription
codequerystringrequired
statequerystringrequired

Responses

StatusMeaningBody
302Redirect to the dashboard—
404Sign-in is not configured on this server—
429Too many requests from this client address. Wait the number of seconds in Retry-After, then try again.Error

Code samples

Set KEY to your own token first.

curl

curl \
  "https://api.sasek.org/ledger/v1/dashboard/github/callback?code=string&state=string"

JavaScript

const res = await fetch("https://api.sasek.org/ledger/v1/dashboard/github/callback?code=string&state=string", {
});
const data = await res.json();

Python

import json
import os
import urllib.request

request = urllib.request.Request(
    "https://api.sasek.org/ledger/v1/dashboard/github/callback?code=string&state=string",
    method="GET",
)
with urllib.request.urlopen(request) as response:
    print(json.load(response))