Message from discussion
User ID is different in assignee vs oauth id
Received: by 10.66.77.131 with SMTP id s3mr290389paw.24.1350643905867;
Fri, 19 Oct 2012 03:51:45 -0700 (PDT)
X-BeenThere: 37signals-api@googlegroups.com
Received: by 10.68.197.72 with SMTP id is8ls6361630pbc.5.gmail; Fri, 19 Oct
2012 03:51:43 -0700 (PDT)
Received: by 10.68.242.74 with SMTP id wo10mr247786pbc.9.1350643903895;
Fri, 19 Oct 2012 03:51:43 -0700 (PDT)
Date: Fri, 19 Oct 2012 03:51:43 -0700 (PDT)
From: Arif Amirani <arif.amir...@gmail.com>
To: 37signals-api@googlegroups.com
Message-Id: <e32c734f-07b1-47d3-8a2a-d543b47a5e9f@googlegroups.com>
In-Reply-To: <CAC2cyGL7Zqd9u9NvOyZV+WfjjOBm=pGuvhTPGTurDGqyX3r0Jg@mail.gmail.com>
References: <146836f3-80d1-4410-8745-9c4241944317@googlegroups.com>
<CAC2cyGL7Zqd9u9NvOyZV+WfjjOBm=pGuvhTPGTurDGqyX3r0Jg@mail.gmail.com>
Subject: Re: [37signals API] User ID is different in assignee vs oauth id
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_Part_664_30845078.1350643903284"
------=_Part_664_30845078.1350643903284
Content-Type: multipart/alternative;
boundary="----=_Part_665_30820400.1350643903284"
------=_Part_665_30820400.1350643903284
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
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
On Thursday, October 18, 2012 8:15:04 PM UTC+5:30, Jeremy Kemper wrote:
>
>
>
> On Thu, Oct 18, 2012 at 6:57 AM, Arif Amirani <arif.a...@gmail.com<javascript:>
> > wrote:
>
>> 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?
>>
>>
> 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
>
------=_Part_665_30820400.1350643903284
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Hi Jeremy,<div><br></div><div>Thanks for the update. The following may not =
be applicable to all but I feel the change is generic enough (maybe).</div>=
<div><br></div><div>In my application, being on mobile, I would like to opt=
imize on the number of HTTP calls that are made to fetch data. Given that a=
n OAuth is mandatory, it should contain the "me" information in the respons=
e to make the "me" API call optional.</div><div><br></div><div>Thanks,</div=
><div><pre><font face=3D"arial,sans-serif">Arif<br>CamperX - Basecamp Next =
for Android<br>Team Envolto</font></pre></div><div><br>On Thursday, October=
18, 2012 8:15:04 PM UTC+5:30, Jeremy Kemper wrote:<blockquote class=3D"gma=
il_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid=
;padding-left: 1ex;"><br><br><div class=3D"gmail_quote">On Thu, Oct 18, 201=
2 at 6:57 AM, Arif Amirani <span dir=3D"ltr"><<a href=3D"javascript:" ta=
rget=3D"_blank" gdf-obfuscated-mailto=3D"n-aQMF1fnNUJ">arif.a...@gmail.com<=
/a>></span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:=
0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi folks,<br><br>I am getting a discrepancy with regards to the currently l=
ogged in user. When I do a OAuth fetch I get the user id as <br><br><pre><s=
pan> "identity"</span>: {<br> <span>"email_address"</span>: <span=
>"x...@xxx.xxx"</span>,<br>
<span>"first_name"</span>: <span>"Arif"</span>,<br> <span>"i=
d"</span>: <b><span>3495765</span></b>,<br> <span>"last_name"</span>=
: <span>"Amirani"</span><br>
}<br><br><span style=3D"font-family:arial,sans-serif">Whereas when I fe=
tch my todos I get the ID as something else:</span><br><br><span> "a=
ssignee"</span>: {<br> <span>"id"</span>: <b><span>26385=
</span></b>,<br>
<span>"name"</span>: <span>"Arif Amirani"</span>,<br> =
<span>"type"</span>: <span>"Person"</span><br> =
},<br><br><font face=3D"arial,sans-serif">On login how do I get the to=
do user id?</font></pre>
</blockquote><div><br></div><div>Hi Arif -</div><div><br></div><div>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.</d=
iv>
<div><br></div><div>The Identity is the id in your OAuth fetch. The Us=
er is a record that that Identity is on this Account. And the Person i=
s the actual Basecamp user. That's the assignee id you listed.</div><div><b=
r>
</div><div>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 aut=
horized Person and link that info to the Identity.</div><div><br></div>
<div>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.</div></d=
iv><div><br></div>-- <br>Jeremy Kemper<br>37signals<br>
</blockquote></div>
------=_Part_665_30820400.1350643903284--
------=_Part_664_30845078.1350643903284--