• saverio
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies

I am trying to download a file attached to a chatter feed. Barring extensions and other naming issues, there is an interesting problem:

 

I get a fresh OAuth access token from the stored refresh token, but every time I try to download the file I get a 401 response containing

 

[{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}]

 

Does anyone have had a similar issue? How can I unblock this? I have read the other messages regarding this but the proposed solutions (if any) do not work for me.

 

This is the command I use to download the file

 

curl -v https://na9.salesforce.com/services/data/v25.0/chatter/files/069E0000000UylDIAS/content -H "Authorization: OAuth xxDExxxxxxxxZCxx%21ARsAQGWxOZVEP.GemGLJ.PTYPGdVxcynRHBB9ExtYCxhgD1UJ6kFR_yVPqOofFZvLEmqxeXMtgXqBVxzvxGGqP_dAPxEvNlx"

 

(I've tried "Bearer" instead of "OAuth" in the auth header, as it's the word I use for the REST API, but the result is the same)

 

(some numbers and letters have been changed to "x" in the token, to protect it. It will expire in any case)

 

 

Thanks to everyone!

 

 

I am trying to download a file attached to a chatter feed. Barring extensions and other naming issues, there is an interesting problem:

 

I get a fresh OAuth access token from the stored refresh token, but every time I try to download the file I get a 401 response containing

 

[{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}]

 

Does anyone have had a similar issue? How can I unblock this? I have read the other messages regarding this but the proposed solutions (if any) do not work for me.

 

This is the command I use to download the file

 

curl -v https://na9.salesforce.com/services/data/v25.0/chatter/files/069E0000000UylDIAS/content -H "Authorization: OAuth xxDExxxxxxxxZCxx%21ARsAQGWxOZVEP.GemGLJ.PTYPGdVxcynRHBB9ExtYCxhgD1UJ6kFR_yVPqOofFZvLEmqxeXMtgXqBVxzvxGGqP_dAPxEvNlx"

 

(I've tried "Bearer" instead of "OAuth" in the auth header, as it's the word I use for the REST API, but the result is the same)

 

(some numbers and letters have been changed to "x" in the token, to protect it. It will expire in any case)

 

 

Thanks to everyone!