I need a little help getting my Bot's Channel ID so it can get verified

Hello all!

I was following a reply at Getting user IDs? and I couldn’t get the API to retrieve my Bot’s Channel ID. I decided to check the Developer Wiki and came across a Curl command for Linux. I have Windows so I decided to install it as a subsystem. Almost an hour had passed trying to install it, finally did, typed out the command, got at 401 error telling me "Must provide a valid Client-ID or OAuth Token. I honestly thought that the Bearer token was where I put my Client-ID, so I authorized with that, nothing.

PLEASE HELP!

- Justin

Also, I don’t want to keep Ubuntu on my computer, so I need help quickly.

You don’t need to install Linux or anything like that. API requests are just HTTP requests, they can be done from pretty much anything with an internet connection, or any operating system, in almost any programming language.

The Getting Started guide to the API explains how to send your client id as a header when making requests: https://dev.twitch.tv/docs/api

And if you make a request to the Get Users endpoint https://dev.twitch.tv/docs/api/reference#get-users using your bots name as the login param you will get a result back containing your bots user ID.

That being said though, why do you even need to be verified? Bot verification is only for accounts that have a specific need to have increased rate limits, personal bots are unlikely to be given verified/known bot status as the default limits are perfectly reasonable for bots on a small number of channels. If by Verified you mean so you can get the verified check mark next to the bots name, you wont be given that.

I’ve tried doing it on my browser with my bot’s username as the login parameter, but it still returns with a 401 and the same message. I thought using Linux would be better since I could use that Curl command.

As for why I need it verified, it’s so my bot can send whispers. The Bot I’m using, PhantomBot, has the option on the dashboard to sent all default command responses in a whisper, so, in turn, people can link their Discord with a code that is private, not open to the public with the chance to be used by someone else.

As per the docs

You need to specify a ClientID as a header, browsers won’t do that “outta the box”

Or you need to specify the oAuth as a Authorization header

curl -H 'Authorization: Bearer cfabdegwdoklmawdzdo98xt2fo512y' \
-X GET 'https://api.twitch.tv/helix/users?id=44322889'

For example

You could of used any posting tool/client Testing tool such as Postman

I’m surprised that dashboard doesn’t easily provide the ID for you.

If you provide the bots username I can just look it up for you.

I’ve tried Postman, but it returned with a 401 as with the previous ways. And I didn’t know I could use an OAuth token as the authorization header, I thought it was the client ID that went there. As for trying it yourself, the bot’s username is NNJBot, if you really want to try. PhantomBot only needs an OAuth token for the channel you want the bot on from the PhantomBot website, and a token from twitchapps.com/tmi/ for the bot to connect. It does not need or supply any other information.

Thanks for the help!

- Justin

{
    "data": [
        {
            "id": "476029548",
            "login": "nnjbot",
            "display_name": "NNJBot",
            "type": "",
            "broadcaster_type": "",
            "description": "",
            "profile_image_url": "https://static-cdn.jtvnw.net/jtv_user_pictures/597885be-ee4b-4f44-8abe-f25c15b9f8da-profile_image-300x300.png",
            "offline_image_url": "https://static-cdn.jtvnw.net/jtv_user_pictures/af5ae7b5-7801-4564-9c66-c3062388c7a5-channel_offline_image-1920x1080.png",
            "view_count": 2
        }
    ]
}

It’s 476029548

Thanks man! I don’t know how you did it, but thanks!

All this hassle just to get my bot verified. smh

I just looked up the username as documented with a ClientID

Honestly, I made a dev app to get a Client ID cause I was following a third-party tutorial. That’s probably why it never worked. lol

Thanks again!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.