Monday 17 January 2011

Google AuthSub for Actionscript

I was very pleased to find this webpage from Google:

Using AuthSub in Actionscript

For a long time I have though about the apps you could build in flex if you could access Google Docs. This would make it really easy to write flex apps without having to worry about a server side component. You just store everything in Google Docs.

Previously you have been unable to access docs for a number of reasons. The first one was that you could not authenticate from a flex app as there was no crossdomain.xml on the authentication server.
At the moment there is still no crossdomain.xml on the docs server but if we can authenticate we can access the picasa APIs which would work well with my picasa API work.

I followed the instructions above and created an app based on the code samples. I was able to get to the Google log in page and got the first single use token. However trying to get a long lived token never worked. Each time I tried I got a 403 error.

I have posted for help about this on StackOverflow.com and on Google’s API help forum but have so far had no responses.

Has anyone else had issues with this or has anyone else got this working? If you have any tips please let me know in the comments.

1 comment:

  1. Hey I ran into the exact same issue today. It's because the 1%2F is encoded when its returned to you.

    If you reformat the token to actually put 1/ (e.g. substitue %2F for the slash) before your token in code, it will work.

    ReplyDelete