0

When the access token expires I am using a command following to this in order to get a new one:

    curl -i -H "Content-Type: application/x-www-form-urlencoded" -H 
    "Accept: application/json" -H "Authorization: Basic THE CODE"  -H 
    "Cache-Control: no-cache" -X POST  
    https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer?
    grant_type=authorization_code&refresh_token=xxxxxxxxxxxxx

Instead of getting new access token I am getting this error:

    HTTP/1.1 400 Bad Request
    Content-Type: application/json;charset=UTF-8
    Content-Length: 27
    Connection: keep-alive
    Keep-Alive: timeout=5
    Server: nginx
    Date: Sat, 19 Aug 2017 11:48:55 GMT
    Strict-Transport-Security: max-age=15552000
    intuit_tid: a406d5cd-3438-d1b2-37fc-d781c9f23ac4
    Cache-Control: no-cache, no-store
    Pragma: no-cache

    {"error":"invalid_request"}

Could you please help me with this?

1 Answers1

0

The grant_type should be refresh_token, not authorization_code

BF4
  • 1,076
  • 7
  • 23