---
title: "Create Github Authorize Url"
method: POST
path: "/api/v1/sources/github/authorize-url"
tags: ["authed"]
---

# Create Github Authorize Url

`POST /api/v1/sources/github/authorize-url`

## Request

- Base URL: `https://api.teaflask.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.teaflask.com/api/v1/sources/github/authorize-url`
- Auth: none declared

Trades the install leg's return (installation id + install state) for
the OAuth leg's URL; the new state binds the installation id so the
connect leg needs nothing client-supplied but GitHub's code.

## Request body

- CreateGitHubAuthorizeUrlRequest
  - `installation_id` integer, required
  - `state` string, required

## Response `200`

Successful Response

- GitHubAuthorizeUrlResponse
  - `authorize_url` string, required

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found
- `405`: Method not allowed
- `422`: Validation error
- `500`: Internal server error

---

[API](https://skmtc.dev/teaflask/apis/teaflask-api.md) - [All operations](https://skmtc.dev/teaflask/apis/teaflask-api/llms.txt) - [OpenAPI document](https://skmtc.dev/teaflask/apis/teaflask-api/revisions/d23e9286b847?raw)
