0

I have successfully sent emails in my application using OAuth 1.0a (using Signpost) by constructing an XOAUTH string as described here. The problem is that access tokens expire after an hour and this XOAUTH won't authenticate the user for SMTP server after that.

Is there a way to extend/refresh the access token's lifetime without user's intervention? I know this Android app does that, but how?

I managed to upgrade to OAuth 2.0 (using Scribe) where I'm given a refresh token as well, but it looks like Gmail XOAUTH doesn't support OAuth 2.0 tokens. Does Google provide another way to send emails?

1
  • UPDATE: GMail now supports XOAUTH with IMAP and SMTP on OAuth 2.0. Commented Feb 10, 2014 at 11:26

1 Answer 1

1

I just managed to fix it. The OAuth 1.0 access token is actually long-lived, but the XOAUTH string is valid for a short period of time, hence needs to be created/signed frequently.

Sign up to request clarification or add additional context in comments.

1 Comment

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.