I'm trying to make sure I get the conversion to DateTime right, using a .Net service to connect want want to store the expiration in a database for later use.
If you are talking about the expires parameter that comes back with the access_token, then it is seconds until it expires.
Do
DateTime expires = DateTime.UtcNow;
expires.AddSeconds(seconds);
and there is your expiry date.
Looks like things were changed yet again. Multiply the returned expiration value (expires_at) by 1000 to get the epoch. In JavaScript anyways, the expiration can be calculated with:
new Date(expires_at * 1000);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With