Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
User ID is different in assignee vs oauth id
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Arif Amirani  
View profile  
 More options Oct 18 2012, 9:57 am
From: Arif Amirani <arif.amir...@gmail.com>
Date: Thu, 18 Oct 2012 06:57:19 -0700 (PDT)
Local: Thurs, Oct 18 2012 9:57 am
Subject: User ID is different in assignee vs oauth id

Hi folks,

I am getting a discrepancy with regards to the currently logged in user.
When I do a OAuth fetch I get the user id as

    "identity": {
        "email_address": "x...@xxx.xxx",
        "first_name": "Arif",
        "id": *3495765*,
        "last_name": "Amirani"
    }

Whereas when I fetch my todos I get the ID as something else:

        "assignee": {
                    "id": *26385*,
                    "name": "Arif Amirani",
                    "type": "Person"
                },

On login how do I get the todo user id?

Appreciate the help.

Thanks,
Arif
CamperX - Basecamp Next for Android
Team Envolto


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeremy Kemper  
View profile  
 More options Oct 18 2012, 10:45 am
From: Jeremy Kemper <jer...@37signals.com>
Date: Thu, 18 Oct 2012 07:44:43 -0700
Local: Thurs, Oct 18 2012 10:44 am
Subject: Re: [37signals API] User ID is different in assignee vs oauth id

On Thu, Oct 18, 2012 at 6:57 AM, Arif Amirani <arif.amir...@gmail.com>wrote:

Hi Arif -

This is, confusingly, exposing some of the internals of our data model.
There are actually three ids at play here: the Identity, the User, and the
Person.

The Identity is the id in your OAuth fetch. The User is a record that that
Identity is on this Account. And the Person is the actual Basecamp user.
That's the assignee id you listed.

So you can't directly correlate a Person id with an Identity id. However!
You can `GET /people/me.json` to get info about the currently authorized
Person and link that info to the Identity.

To make this a bit clearer, we've added identity_id to the Person JSON so
you can directly correlate Basecamp people with 37signals IDs.

--
Jeremy Kemper
37signals


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Arif Amirani  
View profile  
 More options Oct 19 2012, 6:51 am
From: Arif Amirani <arif.amir...@gmail.com>
Date: Fri, 19 Oct 2012 03:51:43 -0700 (PDT)
Local: Fri, Oct 19 2012 6:51 am
Subject: Re: [37signals API] User ID is different in assignee vs oauth id

Hi Jeremy,

Thanks for the update. The following may not be applicable to all but I
feel the change is generic enough (maybe).

In my application, being on mobile, I would like to optimize on the number
of HTTP calls that are made to fetch data. Given that an OAuth is
mandatory, it should contain the "me" information in the response to make
the "me" API call optional.

Thanks,

Arif
CamperX - Basecamp Next for Android
Team Envolto


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeremy Kemper  
View profile  
 More options Oct 19 2012, 9:51 am
From: Jeremy Kemper <jer...@37signals.com>
Date: Fri, 19 Oct 2012 06:51:37 -0700
Local: Fri, Oct 19 2012 9:51 am
Subject: Re: [37signals API] User ID is different in assignee vs oauth id

On Fri, Oct 19, 2012 at 3:51 AM, Arif Amirani <arif.amir...@gmail.com>wrote:

> In my application, being on mobile, I would like to optimize on the number
> of HTTP calls that are made to fetch data. Given that an OAuth is
> mandatory, it should contain the "me" information in the response to make
> the "me" API call optional.

That would be convenient. However, the OAuth service is completely separate
from the applications it authorizes access to, so that information is not
available.

Making a "who am I?" request after you've authorized the app is a one-time
cost. I'd suggest focusing your HTTP optimization efforts on your main API
usage. Supporting HTTP cache freshness headers often has the biggest bang
for the buck: track ETags in API responses, make subsequent requests with
If-None-Match, and handle 304 Not Modified responses.

--
Jeremy Kemper
37signals


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Arif Amirani  
View profile  
 More options Oct 19 2012, 10:12 am
From: Arif Amirani <arif.amir...@gmail.com>
Date: Fri, 19 Oct 2012 07:12:47 -0700 (PDT)
Local: Fri, Oct 19 2012 10:12 am
Subject: Re: [37signals API] User ID is different in assignee vs oauth id

Interesting suggestions Jeremy. I never thought of utilizing them within an
Android app as the APIs are completely stateless. I can imagine the
benefits right away! Time to get hacking :)

Appreciate the help.

Thanks,
Arif


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »