Refresh Token issue

Asked Feb 8, 2021·2 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.

Morning Everyone

When I try refresh a token with the following command:
curl -X POST "https://api.nightbot.tv/oauth2/token" -d "client_id=<REDACTED>&client_secret=<REDACTED>&grant_type=refresh_token&refresh_token=<REDACTED>"

I just get the following:
{"error":"invalid_client","error_description":"Invalid client: client is invalid"}

I have until 18 February to sort it out, that's the 60 day limit as described in the documentation when I set it up, and previously it's been working fine.

Please assist?

Kind regards

2 replies

I am not able to reproduce any issues with authorization codes or refresh tokens:

$ curl https://api.nightbot.tv/oauth2/token -d 'code=REDACTED&client_id=REDACTED&client_secret=REDACTED&grant_type=authorization_code' -X POST -H 'Content-Type: application/x-www-form-urlencoded'
{"access_token":"REDACTED","token_type":"bearer","expires_in":2592000,"refresh_token":"REDACTED","scope":"me"}
$ curl https://api.nightbot.tv/oauth2/token -d 'refresh_token=REDACTED&client_id=REDACTED&client_secret=REDACTED&grant_type=refresh_token' -X POST -H 'Content-Type: application/x-www-form-urlencoded'
{"access_token":"REDACTED","token_type":"bearer","expires_in":2592000,"refresh_token":"REDACTED","scope":"me"}

In the end it was easier to create a new app, get a new secret and just update nightbot in streamlabs.

Kind regards