# Refresh Creator's Access Token - I'm failing

**URL:** <https://www.patreondevelopers.com/t/refresh-creators-access-token-im-failing/1091>\
**Category:** API Feedback\
**Created:** [August 28, 2018, 7:44am UTC](https://www.patreondevelopers.com/t/refresh-creators-access-token-im-failing/1091 "2018-08-28T07:44:19Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Meffesino](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@Meffesino](https://www.patreondevelopers.com/u/Meffesino)\
**Post date:** [August 28, 2018, 8:53am UTC](https://www.patreondevelopers.com/t/refresh-creators-access-token-im-failing/1091/2 "2018-08-28T08:53:23Z")

</div>

OK. i figured it out by myself. First of all, I had done  
`request.get` while the mothod was (correctly) stated as “post”.

secondly, the body has to be created a bit differently.

here you go:

```
var CLIENT_ID = '<ID>'

var CLIENT_SECRET = '<SECRET>'

var token = '<Token- NOT NEEDED FOR REFRESH TOKEN>' 

var refresh_Token =<REFRESH TOKEN>' //

var form = {
    grant_type: 'refresh_token',
    client_id: CLIENT_ID,
    client_secret: CLIENT_SECRET,
    refresh_token: refresh_Token
}

var formData = querystring.stringify(form);
var contentLength = formData.length;

request({
    headers: {
      'Content-Length': contentLength,
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    uri: 'https://www.patreon.com/api/oauth2/token',
    body: formData,
    method: 'POST'
  }, function (err, res, body) {
console.log(body)  
});
```

---

_[View the full topic](https://www.patreondevelopers.com/t/refresh-creators-access-token-im-failing/1091)._
