Where is the user id on request?

30 views
Skip to first unread message

Chris Gilmer

unread,
Nov 9, 2010, 12:02:13 PM11/9/10
to glue-development
I'm building an oauth system in python based on the Tornado web
server's built in auth system to connect with Get Glue. My first
surprise is that the oauth token isn't returned in both the response
and the cookie, I only find it in the cookie. However, once I figured
that out I found myself stuck on another problem. Where is the user
id on the next request?

I assume that, as with most oauth systems, I will get the id of the
user or the username of the authenticated user either in the response
or the cookie. I get neither. And the api documentation doesn't make
it clear where I should send my next request to get that information.
Can anyone help here?

I'd appreciate any advice or guidance on this issue.

Chris

Karen

unread,
Nov 9, 2010, 5:29:43 PM11/9/10
to glue-development
Hi Chris,

Good find. Previously we've been telling developers to make an extra
ping call to
return the userId from the token. We are deprecating that in favor for
returning the
userId on the cookie after querying for the access_token.

We will also be adding all return parameters to the response headers
as well.

Our next API release will be end of this week, so look for that then.

Thanks for your patience!

Karen

Chris Gilmer

unread,
Nov 15, 2010, 8:06:12 PM11/15/10
to glue-development
Karen,

Did you release the documentation this week to run these new calls? I
want to try and get my application up and running so we can start
using Get Glue:)

Best,
Chris

Karen Teng

unread,
Nov 17, 2010, 9:06:57 AM11/17/10
to glue-development
This is now live on our API platform. The documentation will be
updated to say:

After successfully accessing the token, the Glue API returns the
glue_userId of the user who just logged in, along with the oauth_token
and oauth_token_secret. These values are also returned in the response
headers.

Chris Gilmer

unread,
Nov 18, 2010, 1:44:49 PM11/18/10
to glue-development
Excellent! The oauth_token and _oauth_token_secret are stored under
_oauth_request_token in the cookie and separated by a '|' character.
What is the glue_userID stored under in the cookie? I'll also take a
look at the headers to see what's there.

Chris

Dominick D'Aniello

unread,
Nov 18, 2010, 2:20:13 PM11/18/10
to glue-dev...@googlegroups.com
You should not be reading these values out of a cookie. Instead, you should get the values from the response to your call to http://api.getglue.com/oauth/access_token

You should receive something like:

oauth_token=XXXXXXX&oauth_token_secret=XXXXXX&glue_userId=XXXXXX

As karen mentioned you can also grab this out of the response headers:

--
You received this message because you are subscribed to the Google Groups "glue-development" group.
To post to this group, send email to glue-dev...@googlegroups.com.
To unsubscribe from this group, send email to glue-developme...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/glue-development?hl=en.


Reply all
Reply to author
Forward
0 new messages