How to refresh the OAuth token? | XM Community
Solved

How to refresh the OAuth token?

  • 30 November 2020
  • 2 replies
  • 426 views

Badge

Hi! I'm following this guide on implementing OAuth2: https://api.qualtrics.com/instructions/docs/Instructions/Quick%20Start/getting-more-secure-with-oauth.md
Everything is fine so far, but the docs do not mention how to refresh the token after expiry - what is the endpoint to call and what are the parameters? Usually I'd expect a call to

oauth/token?refresh_token=...&grant_type=refresh
but it's not mentioned anywhere.

icon

Best answer by LukaszK 4 December 2020, 22:02

View original

2 replies

Badge +2

https://api.qualtrics.com/guides/docs/Instructions/oauth-authentication.md#expired-token-server-response

Badge

Answering my own question, as we have figured this out on our own:

You need to

POST
to
/oauth2/token
endpoint with the following parameters:

query-params: { grant_type: "refresh_token", refresh_token: "THE TOKEN" }
and use the client ID and client secret as basic authentication info.

Leave a Reply