Unable to get access_token with my clientid and secret

(Renuka kasagani) #1

unable to get access_token with my client id and secret, regarding this issue.
client_id- {clientId}
client_secret- {clientSecret}

using postman I tried to get response by below api using recent refresh_token

https://api.infusionsoft.com/token?grant_type=refresh_token&refresh_token=djxxgksrb65mzrr7be2q6vhx&response_type =token
got response like
“error”: “invalid_request”,
“error_description”: “response_type or grant_type is required”

1 Like
(Tom Scott) #2


grant_type string
...The only current valid value is grant_type=authorization_code Defaults to authorization_code

Additionally, never share your Client Secret, it is effectively a password to your API account.

(Jagdish Narkar) #3

Hey, the link you posted is about Requesting Access Token NOT “Refresh an Access Token”. Can you please take a look at the question one more time? Can you look at this link Refresh Access Token

I am having exact same error, need solution.

(Jagdish Narkar) #4

Can you please let me know if this issue is resolved for you. I am pretty sure this must have resolved for you. Thanks in advance.

(Nicholas Trecina) #5

Hi @Jagdish_Narkar, make sure that you are making a POST to the token endpoint and sending the data as content type application/x-www-form-urlencoded. Here’s an example request using cURL:

## Refresh Access Token
curl -X "POST" "https://api.infusionsoft.com/token" \
     -H 'Content-Type: application/x-www-form-urlencoded; charset=utf-8' \
     --data-urlencode "refresh_token=REFRESH_TOKEN" \
     --data-urlencode "grant_type=refresh_token"
(Jagdish Narkar) #6

Thanks Nicolas, Only one question regarding data, it should be as follows?
Can you please confirm?

(Nicholas Trecina) #7

Correct, and those should be URL encoded and in the POST body, not the URL.

1 Like