GitHub
GitHub on PostFuze has two sides. Publishing a post to a connected GitHub account creates a Gist — the container content becomes a gist file. Separately, a set of read endpoints return public GitHub data (profiles and repositories) with no connection required. The platform id is github.
Publishing to GitHub creates a Gist
post.md). Use config.github to set the file name, description, and whether the gist is public or secret.Supported content
- Gist — the main container content becomes one gist file. Public by default; set
public: falsefor a secret gist.
Configuration fields
Set under config.github:
| Field | Type | Required | Notes |
|---|---|---|---|
filename | string | No | The gist file name. Defaults to post.md (renders as Markdown). |
description | string | No | Gist description. Defaults to the first line of the content. |
public | boolean | No | Public (default) or secret gist. |
Required scopes
Configure scopes on the BYOK network record. When none are set, PostFuze requests:
gist— create gists (the publish scope).read:user— read the account identity at connect.
GitHub OAuth-App access tokens don’t expire and aren’t rotated, so no refresh token is stored.
Connecting an account
Create an OAuth App under Settings → Developer settings → OAuth Apps and set its Authorization callback URL to your PostFuze callback. Copy the Client ID and generate a Client Secret, then register them with POST /social-networks and start the hosted OAuth flow.
Create a post
Publish a public gist:
curl https://api.postfuze.com/api/v1/posts \
-H "Authorization: Bearer sk_live_…" \
-H "Content-Type: application/json" \
-d '{
"accounts": ["acct_github_01"],
"containers": [
{ "content": "# Release notes\n\nv1.2 ships the unified social API." }
],
"config": {
"github": {
"filename": "RELEASE.md",
"description": "v1.2 release notes",
"public": true
}
}
}'Read endpoints
These return public GitHub data and need only a valid API key — no connected account. Backed by GitHub’s public REST API.
| Endpoint | Returns |
|---|---|
GET /github/profile?handle= | A user’s public profile (followers, repos, bio). |
GET /github/repo?owner=&repo= | One repository’s detail (stars, forks, language, license). A url= is also accepted. |
GET /github/profile/repos?handle= | A page of a user’s public repositories (sort, per_page, page). |
curl "https://api.postfuze.com/api/v1/github/profile?handle=octocat" \
-H "Authorization: Bearer sk_live_…"See Posts for how per-target publish errors surface in error_code / error_message.