CustomAPI new follower command.

Asked Dec 2, 2020·4 replies·Last activity 5 years ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

When trying to create a custom API for nightbot to thank new followers in the chat when they follow using nightbot, I'm running into issues when trying to put the actual command into the cmd prompt. The guide I'm following is found here; /t/nightbot-alerts-in-chat/1534589171388125265

When I put in the command - ```
curl -X POST "https://api.nightbot.tv/oauth2/token" -d "client_id=<CLIENT_ID>&client_secret=<CLIENT_SECRET>&grant_type=refresh_token&refresh_token=<REFRESH_TOKEN>"

and enter my client ID and the client secret in the area's shown above it comes back with -
{"message":"Invalid client: client is invalid","code":400,"name":"invalid_client"}
not sure what to do about this now even after creating the custom widget through streamlabs to enable the custom javascript add on for the API to send it in the livechat.
Thanks

4 replies

Hey @Quick Turkey!

Make sure the CLIENT_ID, CLIENT_SECRET and REFRESH_TOKEN are proper, don't use these characters < > either.

Hi @Polar Cat

I've removed the < > characters now and make sure everything is correct which it is, however now I only receive this message in reply to what I sent previously;

{"status":404,"message":"Not Found"}

I can't make sure my refresh token is correct as I meant to receive that after I send the first command which allows me to get my refresh token as well as my access token, however I can't even get the first command to work yet.

I get it now, it's because you're using the wrong command, read the guide carefully, it works fine:

JYB5hQS4fF.png

Oh damn I'm blind lmao

Thanks a lot for the help, got it working now