Refreshing Access Token
const refreshToken = 'PGFanyIh-GUKReZ5P1LlAsUJzBR76BQI5SJlIX4-aHQ'
const tokenUrl = 'http://api-sandbox.edgetag.io/v1/oauth-app/client/token'
const body = new URLSearchParams({
refresh_token: refreshToken,
grant_type: 'refresh_token',
})
const response = await fetch(tokenUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
Authorization: `Basic ${btoa(clientId + ':' + clientSecret)}`,
},
body
})curl --request POST \
--url http://api-sandbox.edgetag.io/v1/oauth-app/client/token \
--header 'Authorization: Basic ZDAyNzJjNDItN2VjYy00ODk5LWExYTctMDgwMWE4YTlkYTJmOmQwMjcyYzQyLTdlY2MtNDg5OS1hMWE3LTA4MDFhOGE5ZGEyZg==' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data refresh_token=PGFanyIh-GUKReZ5P1LlAsUJzBR76BQI5SJlIX4-aHQ \
--data grant_type=refresh_tokenLast updated
Was this helpful?

