provider apps POST /applications/{client_id}/token/scoped
@utdk/github /applications/{client_id}/token/scoped
Create a scoped access token
Use a non-scoped user access token to create a repository-scoped and/or permission-scoped user access token. You can specify which repositories the token can access and which permissions are granted to the token. Invalid tokens will return `404 NOT FOUND`.
client_id path required
The client ID of the GitHub app.
string

Try it

Authentication
Configure credentials for GitHub v3 REST API
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.

Saved automatically to browser storage.

apps.scopeToken
POST/applications/{client_id}/token/scoped
Use a non-scoped user access token to create a repository-scoped and/or permission-scoped user access token. You can specify which repositories the token can access and which permissions are granted to the token. Invalid tokens will return `404 NOT FOUND`.

Parameters

required

The client ID of the GitHub app.

Input

required

The access token used to authenticate to the GitHub API.

The name of the user or organization to scope the user access token to. **Required** unless `target_id` is specified.

The ID of the user or organization to scope the user access token to. **Required** unless `target` is specified.

The list of repository names to scope the user access token to. `repositories` may not be specified if `repository_ids` is specified.

The list of repository IDs to scope the user access token to. `repository_ids` may not be specified if `repositories` is specified.

The permissions granted to the user access token.

Enter a gateway URL above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import github from '@utdk/github';

await github.apps.scopeToken()