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

GitHub isn’t a feed, so “a post” maps to a Gist: your content is created as a single file (default 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: false for a secret gist.

Configuration fields

Set under config.github:

FieldTypeRequiredNotes
filenamestringNoThe gist file name. Defaults to post.md (renders as Markdown).
descriptionstringNoGist description. Defaults to the first line of the content.
publicbooleanNoPublic (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
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.

EndpointReturns
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
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.