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

**URL:** <https://www.patreondevelopers.com/t/creator-authorization-token-doesnt-work-cant-refresh/1522>\
**Category:** Friendly Help\
**Created:** [February 12, 2019, 2:21pm UTC](https://www.patreondevelopers.com/t/creator-authorization-token-doesnt-work-cant-refresh/1522 "2019-02-12T14:21:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sherpa](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/sherpa/32/812_2.png) [@Sherpa](https://www.patreondevelopers.com/u/Sherpa)\
**Post date:** [February 12, 2019, 2:21pm UTC](https://www.patreondevelopers.com/t/creator-authorization-token-doesnt-work-cant-refresh/1522/1 "2019-02-12T14:21:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![phildini](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/phildini/32/112_2.png) [@phildini](https://www.patreondevelopers.com/u/phildini)\
**Post date:** [February 12, 2019, 10:41pm UTC](https://www.patreondevelopers.com/t/creator-authorization-token-doesnt-work-cant-refresh/1522/2 "2019-02-12T22:41:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Sherpa](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/sherpa/32/812_2.png) [@Sherpa](https://www.patreondevelopers.com/u/Sherpa)\
**Post date:** [February 13, 2019, 1:38am UTC](https://www.patreondevelopers.com/t/creator-authorization-token-doesnt-work-cant-refresh/1522/3 "2019-02-13T01:38:07Z")

</div>

It would seem the body of the response is empty…

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/patreondevelopers/original/1X/59f8d950e42bcd4c029a2682d880d004f6204404.png)

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

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

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/patreondevelopers/original/1X/1a05826c682519146ec00c07afa529b0e688a597.png)

---

<div class="post-metadata">

**Author:** ![Sherpa](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/sherpa/32/812_2.png) [@Sherpa](https://www.patreondevelopers.com/u/Sherpa)\
**Post date:** [February 13, 2019, 6:18am UTC](https://www.patreondevelopers.com/t/creator-authorization-token-doesnt-work-cant-refresh/1522/4 "2019-02-13T06:18:54Z")

</div>

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?](https://www.patreondevelopers.com/t/does-the-creators-access-token-expire/523) 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)?
