Getting User ID from oauth token

84 views
Skip to first unread message

Bradford

unread,
Aug 16, 2013, 6:42:42 PM8/16/13
to justintv-ap...@googlegroups.com
Hello,

I'm developing an app that allows people to sign in to Justin.tv and see their profile, add favorites, delete favorites, etc. Twitch.tv makes this easy, because I can get a profile object just from making an api call with the oauth credentials. Justin.tv doesn't seem to have this API call, requiring instead that I know the user's username in order to get their profile. 

I'd like to avoid asking them for their user id, since I'm asking them to give my app permissions to get their profile data anyway.

Is there a hidden API call that I'm missing? Or is this flow just not possible?

Bradford

Bradford

unread,
Aug 19, 2013, 12:45:42 PM8/19/13
to justintv-ap...@googlegroups.com
Anything at all would be appreciated

Kyle Vogt

unread,
Aug 19, 2013, 1:34:28 PM8/19/13
to justintv-ap...@googlegroups.com


--
You received this message because you are subscribed to the Google Groups "Justin.tv API Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to justintv-api-deve...@googlegroups.com.
To post to this group, send email to justintv-ap...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/justintv-api-developers/6919cce3-0c37-4365-8fab-c6160976a35f%40googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.



--
Kyle Vogt   |   General Manager, Justin.tv   |   @kvogt

Bradford

unread,
Aug 19, 2013, 6:48:48 PM8/19/13
to justintv-ap...@googlegroups.com
Thanks for that, I had tunnel vision apparently, looking at the users section.


On Monday, August 19, 2013 12:34:28 PM UTC-5, Kyle Vogt wrote:
On Mon, Aug 19, 2013 at 9:45 AM, Bradford <lawbra...@gmail.com> wrote:
Anything at all would be appreciated


On Friday, August 16, 2013 5:42:42 PM UTC-5, Bradford wrote:
Hello,

I'm developing an app that allows people to sign in to Justin.tv and see their profile, add favorites, delete favorites, etc. Twitch.tv makes this easy, because I can get a profile object just from making an api call with the oauth credentials. Justin.tv doesn't seem to have this API call, requiring instead that I know the user's username in order to get their profile. 

I'd like to avoid asking them for their user id, since I'm asking them to give my app permissions to get their profile data anyway.

Is there a hidden API call that I'm missing? Or is this flow just not possible?

Bradford

--
You received this message because you are subscribed to the Google Groups "Justin.tv API Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to justintv-api-developers+unsub...@googlegroups.com.

To post to this group, send email to justintv-ap...@googlegroups.com.

Bradford

unread,
Aug 21, 2013, 11:21:48 PM8/21/13
to justintv-ap...@googlegroups.com
I'm receiving the following error when attempting the whoami.json request:

  1. {
  2. "error": "local variable 'token' referenced before assignment",
  3. "url": "/api/account/whoami.json"
  4. }

The whole OAuth flow seems to be going well until that point. It sounds like an error on your end, can you check it out and let me know?

Thanks,

Bradford


On Monday, August 19, 2013 12:34:28 PM UTC-5, Kyle Vogt wrote:
On Mon, Aug 19, 2013 at 9:45 AM, Bradford <lawbra...@gmail.com> wrote:
Anything at all would be appreciated


On Friday, August 16, 2013 5:42:42 PM UTC-5, Bradford wrote:
Hello,

I'm developing an app that allows people to sign in to Justin.tv and see their profile, add favorites, delete favorites, etc. Twitch.tv makes this easy, because I can get a profile object just from making an api call with the oauth credentials. Justin.tv doesn't seem to have this API call, requiring instead that I know the user's username in order to get their profile. 

I'd like to avoid asking them for their user id, since I'm asking them to give my app permissions to get their profile data anyway.

Is there a hidden API call that I'm missing? Or is this flow just not possible?

Bradford

--
You received this message because you are subscribed to the Google Groups "Justin.tv API Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to justintv-api-developers+unsub...@googlegroups.com.

To post to this group, send email to justintv-ap...@googlegroups.com.

Bradford

unread,
Aug 22, 2013, 4:48:31 PM8/22/13
to justintv-ap...@googlegroups.com
If you need the whole Auth header I'm willing to send that your way - just let me know your email. Hoping to get this figured out soon, and knowing whether it is your or my error would help a lot.

Bradford

Kyle Vogt

unread,
Aug 22, 2013, 6:22:27 PM8/22/13
to justintv-ap...@googlegroups.com
deploying a fix now, should be live in ~10 minutes.


To unsubscribe from this group and stop receiving emails from it, send an email to justintv-api-deve...@googlegroups.com.

To post to this group, send email to justintv-ap...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

Bradford

unread,
Aug 22, 2013, 7:01:31 PM8/22/13
to justintv-ap...@googlegroups.com
It works now, thank you!


On Thursday, August 22, 2013 5:22:27 PM UTC-5, Kyle Vogt wrote:
deploying a fix now, should be live in ~10 minutes.
On Thu, Aug 22, 2013 at 1:48 PM, Bradford <lawbra...@gmail.com> wrote:
If you need the whole Auth header I'm willing to send that your way - just let me know your email. Hoping to get this figured out soon, and knowing whether it is your or my error would help a lot.

Bradford


On Wednesday, August 21, 2013 10:21:48 PM UTC-5, Bradford wrote:
I'm receiving the following error when attempting the whoami.json request:

  1. {
  2. "error": "local variable 'token' referenced before assignment",
  3. "url": "/api/account/whoami.json"
  4. }

The whole OAuth flow seems to be going well until that point. It sounds like an error on your end, can you check it out and let me know?

Thanks,

Bradford

On Monday, August 19, 2013 12:34:28 PM UTC-5, Kyle Vogt wrote:
On Mon, Aug 19, 2013 at 9:45 AM, Bradford <lawbra...@gmail.com> wrote:
Anything at all would be appreciated


On Friday, August 16, 2013 5:42:42 PM UTC-5, Bradford wrote:
Hello,

I'm developing an app that allows people to sign in to Justin.tv and see their profile, add favorites, delete favorites, etc. Twitch.tv makes this easy, because I can get a profile object just from making an api call with the oauth credentials. Justin.tv doesn't seem to have this API call, requiring instead that I know the user's username in order to get their profile. 

I'd like to avoid asking them for their user id, since I'm asking them to give my app permissions to get their profile data anyway.

Is there a hidden API call that I'm missing? Or is this flow just not possible?

Bradford

--
You received this message because you are subscribed to the Google Groups "Justin.tv API Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to justintv-api-developers+unsubscr...@googlegroups.com.

To post to this group, send email to justintv-ap...@googlegroups.com.



--
Kyle Vogt   |   General Manager, Justin.tv   |   @kvogt

--
You received this message because you are subscribed to the Google Groups "Justin.tv API Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to justintv-api-developers+unsub...@googlegroups.com.
To post to this group, send email to justintv-ap...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages