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 ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-github |
| Version | 1.0 |
Input Schema ​
No input fields required.
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
email | string | No | — | — |
login | string | No | — | — |
name | string | No | — | — |
scopes | list | No | — | — |
type | string | No | — | — |
user_id | string | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "github.auth.validate_token",
"initial_data": { }
}