+ Start a Discussion
cupendracupendra 

Chatter REST API version.

Hi, I am new to Chatter REST API. Trying to get some samples working. However I found that when I try to retrieve my profile, in the version part of URL, I have used version 24.0 as specified in the documetnation assuming that could be the altest version. But, when I tried the profile API call(v24.0/chatter/users/me), It returned me 404 error. Then after spending some time boggling what is wrong, I tried with a different version number(in my case it is v23.0). Which has worked and returning me the profile info.

 

Now the question is How do I know version? Where do I find that?

 

 

Thanks,

Upendra

Best Answer chosen by Admin (Salesforce Developers) 
ChrisOctagonChrisOctagon

v24 is part of the "Spring 12" release and has not been released on production instances yet. Please refer to the Spring 12 release schedule at the bottom of http://trust.salesforce.com/trust/status/ .

All Answers

ChrisOctagonChrisOctagon

Hi Upendra,

 

Can you please post the HTTP request that isn't working against v24.0? Are you including the OAuth token?

 

- Chris

cupendracupendra

Hi Chris,

 

thanks for responding.

 

Here is the log for v24.0

Request URL: https://ap1.salesforce.com/services/data/v24.0/chatter/users/me
Response Line : {"id":"https://login.salesforce.com/id/00D90000000cBblEAE/00590000000xtBeAAI","issued_at":"1327909243193","instance_url":"https://ap1.salesforce.com","signature":"aIDbp0zWdlqxYNlNqocHYF7aV++saYgU/aXQ6p3Woj4=","access_token":"00D90000000cBbl!AQIAQMrdOb32iosmrP7mRfpxJZid_GYQFtiGaHzEw4K_uNu_7HAq_Y8qzkoG.cAcCIambrc0FKOEfbodx6vOhduyCfF4Fp3o"}

Print Profile Response String : [{"message":"The requested resource does not exist","errorCode":"NOT_FOUND"}]

 

I get the usual 404 error.

 

Here is the log for v23.0

Request URL: https://ap1.salesforce.com/services/data/v23.0/chatter/users/me
Response Line : {"id":"https://login.salesforce.com/id/00D90000000cBblEAE/00590000000xtBeAAI","issued_at":"1327909399924","instance_url":"https://ap1.salesforce.com","signature":"tADvHs+tpsrfHgxUMGYAseocoy4NHp3J/GAqzat8wwM=","access_token":"00D90000000cBbl!AQIAQMrdOb32iosmrP7mRfpxJZid_GYQFtiGaHzEw4K_uNu_7HAq_Y8qzkoG.cAcCIambrc0FKOEfbodx6vOhduyCfF4Fp3o"}

Print Profile Response String : {"address":{"state":"Unknown","country":"IN","street":null,"city":null,"zip":"560102"},"email":"upendra.chintala@gmail.com","currentStatus":{"url":"/services/data/v23.0/chatter/users/00590000000xtBeAAI/status","body":{"text":"Enabling Enterprise Social Collaboration using SalesForce Chatter API Initiative from Accenture Tech Labs","messageSegments":[{"type":"Text","text":"Enabling Enterprise Social Collaboration using SalesForce Chatter API Initiative from Accenture Tech Labs"}]},"parentId":"00590000000xtBeAAI"},"managerId":null,"followingCounts":{"total":0,"records":0,"people":0},"groupCount":1,"followersCount":0,"managerName":null,"aboutMe":null,"isActive":true,"phoneNumbers":[],"chatterActivity":{"commentCount":0,"commentReceivedCount":1,"likeReceivedCount":0,"postCount":1},"name":"Upendra Chintala","title":null,"firstName":"Upendra","lastName":"Chintala","companyName":"Gmail","mySubscription":null,"photo":{"smallPhotoUrl":"https://c.ap1.content.force.com/profilephoto/005/T","largePhotoUrl":"https://c.ap1.content.force.com/profilephoto/005/F"},"isChatterGuest":false,"id":"00590000000xtBeAAI","type":"User","url":"/services/data/v23.0/chatter/users/00590000000xtBeAAI"}

Here I get the Profile info.

 

I am using Apache HttpClient.

 

Yes, I am passing the OAuth token as request header.: Authorization = OAuth <access_token>.

 

Thanks again for looking into this.

 

 

 

ChrisOctagonChrisOctagon

v24 is part of the "Spring 12" release and has not been released on production instances yet. Please refer to the Spring 12 release schedule at the bottom of http://trust.salesforce.com/trust/status/ .

This was selected as the best answer