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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
code | query | string | required | |
state | query | string | required |
Responses
| Status | Meaning | Body |
|---|---|---|
302 | Redirect to the dashboard | — |
404 | Sign-in is not configured on this server | — |
429 | Too 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))