Skip to content
Proud to collaborate with Microsoft for Startups

github.auth.validate_token ​

Validate a GitHub personal access token or org token

Validate a GitHub personal access token (PAT) or organisation token.

Both PAT formats (classic and fine-grained) use the same validation endpoint. Returns caller identity and the OAuth scopes granted to the token.

Inputs: none (token comes from the github plugin).

Outputs (terminal state_data):

  • login: str — GitHub username
  • user_id: int — GitHub user ID
  • type: str — User | Organization
  • name: str | None — display name
  • email: str | None — public email
  • scopes: list[str] — OAuth scopes granted (may be empty for fine-grained PATs)

Plugin required: context.get_plugin("github") must expose .token.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-github
Version1.0

Input Schema ​

No input fields required.

Output Schema ​

FieldTypeRequiredDefaultDescription
emailstringNo——
loginstringNo——
namestringNo——
scopeslistNo——
typestringNo——
user_idstringNo——
failure_reasonstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
failed_stepstringNo——
failed_layerstringNo——
errorstringNo——
error_typestringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—execute—
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompleted—
* (any state)failfailed—

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "github.auth.validate_token",
  "initial_data": { }
}