I have a problem while testing my app and I have too many of the same type of eventsub subscription so i need to delete them, I was going to use the twitch-cli but I can’t figure out how to pass in my app token, what’s the correct format to pass in the token, i’ve tried
app-token
app_token
apptoken
token
But everything returns the same response
-q
is for passing query paramters
The authentication token is not a query parameter it is a header.
You can configure twitch-cli
to generate and use an Access Token
# Token
Used to fetch an access token. This can fetch either an app access token or user token (with scopes) and stores for further use. It is important to note that this requires the running of `twitchdev configure` before it'll fetch tokens. If you don't run [`configure`](configure.md) prior to running `token`, you will be prompted to configure the application.
**IMPORTANT**
To use user tokens, you will need to set up your Client ID provided during [`configure`](configure.md) with a redirect URI of `http://localhost:3000`. App access tokens will work without this step. You can configure that [on the Twitch Developer console](https://dev.twitch.tv/console).
**Args**
None.
**Flags**
| Flag | Shorthand | Description | Example | Required? (Y/N) |
|----------------|-----------|-------------------------------------------------------------------------------------------------------|----------------------------------------------|-----------------|
| `--user-token` | `-u` | Whether to fetch a user token or not. Default is false. | `token -u` | N |
| `--scopes` | `-s` | The space separated scopes to use when getting a user token. | `-s "user:read:email user_read"` | N |
| `--revoke` | `-r` | Instead of generating a new token, revoke the one passed to this parameter. | `-r 0123456789abcdefghijABCDEFGHIJ` | N |
This file has been truncated. show original
Checking the docs, the cli doesn’t support the use of an arbitary/passed in token.
darn, I’ll have to find another way to remove the subscriptions.
Cheers Barry
Or just use the CLI to generate an App Access Token, feed it the clientID and secret and generate an app access token and away you go.
Aaaah makes sense! Cheers, that’s done the job nicely.
system
Closed
March 20, 2021, 2:57pm
6
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.