Hi Gordon,
So, you'll call the OAuthLogin procedure as part of your setup to call the API.
OauthLogin may, or may not, display a login screen to the user.
a) if the token is still valid it just returns
b) if the token has timed out, it'll try to get a refresh token. If that succeeds it'll just return.
c) If the above 2 fail the user gets to log in again.
>> I'm assuming I need to initialise the OAuth class before sending or receiving emails to ensure I have a valid token, do I only need do this when the token has passed it's expiry date/time or every time?
The OAuthclass is inside OAuthLogin, so you don't really need to do anything with it. You just call OAuthLogin and it'll figure it out.
>> I don't seems to get a refreshtoken, the value stored in the ini file is always blank.
Whether you get a refresh token or not depends on the service. I would expect refreshtokens to be stored in the ini file if they are successfully retrieved.
Cheers
Bruce