I’m struggling to figure out how to get an access token if I have a refresh token. Here’s the closest thing I can find (I’ve replaced the actual values). It’s throwing an “invalid access_token” exception:
var client = new AuthenticationApiClient(new Uri(myDomain));
var accessTokenRequest = new AccessTokenRequest()
{
AccessToken = myRefreshToken,
ClientId = myClientID,
Connection = myConnection,
Scope = null,
};
var accessToken = await client.GetAccessTokenAsync(accessTokenRequest);
Is it the case that this is the correct method for obtaining an access token, and I’m just passing in bad values, or is there a different method?
To be honest, the above approach doesn’t make sense. If you’re requesting an access token, why do you need to pass in an access token as part of the AccessTokenRequest object? That’s why I suspect there’s a better way.