On Nov 5, 3:57 pm, jaredm <[EMAIL PROTECTED]> wrote:
> Thanks for the quick reply Erik!
>
> The 401 and 403 errors make sense, that was covered well in the docs
> which is much appreciated.  I just have one quick question regarding
> your last response.
>
> > > I'm assuming that a 401 or a 403 means the token is broken and must be
> > > refreshed.  If I catch one of those errors I will remove the token
> > > from our database and notify the user that the link is down and give
> > > them the option to retrieve a new token.  Is this best practice?
>
> > I would read the body of the server's response (or the library's
> > exception)
> > and proceed accordingly.
>
> My question is more or less: What is "best practice" for dealing with
> invalid/revoked tokens?  Since I now know that a 401 or 403 error
> means the token is bad, is it best to delete the token on my end
> immediately and notify the user that the link has been broken and the
> data has stopped flowing?  Is there any sort of guidance as far as how
> people typically implement this process?

There are general suggestions in the Best Practices Guide:
http://code.google.com/apis/health/best_practices.html

In short, do exactly as you mentioned (caught the exception, remove
the token
from your db, and and take the user back to AuthSub for a new token).

E
>
> Thanks a bunch,
> Jared
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Health Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/googlehealthdevelopers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to