Creator Authorization token doesn't work, can't refresh


#1

I am trying to query the GET /api/oauth2/v2/campaigns/{campaign_id}/members endpoint.

I do it via Postman, works perfectly.
I do it via my application, 401 Unauthorized.
I try again via Postman, 401.

It would seem my application is somehow killing the token. The URL for both matches, and the same happens even without the includes.
It’s the same if I use the token that my client gives me than if I get one via the normal OAuth2 flow.
I have copied the headers that seem relevant from Postman (Accept: “/”, accept-encoding: “gzip, deflate”).
The calls (with a different token) to retrieve a user’s identity work.

Edit: I can’t even refresh the token.


#2

Hey there. Can you post the responses you’re getting?


#3

It would seem the body of the response is empty…

Here’s the method I’m using for that: https://hastebin.com/wofezitiya.java

Edit: Can confirm that the same method works just fine for the Twitch API


#4

I got an error message!

First, I forgot to mention, I am now only dealing with the refreshing of the token, since I am no longer having to query all of the campaign’s members. So the 401 I need to fix is only for the token endpoint with the grant_type=refresh_token.

Now for the error. I copied the URL I got from my app, which is the one the app uses to attempt a token refresh, and pasted it into Postman, and I got a 401 Unauthorized status, with the body { "error": "invalid_grant" }.
Is it perhaps what’s discussed here? That, since it’s a ‘creator’ token, I don’t need to refresh it (even though the client allows me to click “refresh” and grants me new auth and refresh tokens)?