function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Chirag MehtaChirag Mehta 

Destination URL not reset : Chatter REST API : Upload Photo

I'm trying to upload photo using chatter rest api, and its working great for test.salesforce.com and login.salesforce.com.

 

I'm able to login using OAUTH, do get in response instance_url, acess_token etc, and I set the instance_url in my photo upload request and its works great only when my instance_url is a nxxx.salesforce.com or c**.salesforce.com (ie it works for valid salesforce production and sandbox instances).

 

However when I try to login against *.cloudforce.com (a salesforce org), login is successful, instance_url returned is xxx.cloudforce.com, but when I use that instance url for photo upload request its says "Destination URL not reset". Is it something to do with this exception type org of *.cloudforce.com ? 

Chirag MehtaChirag Mehta

Hey Salesforce ..the Lord .. Are you listening? Please help!  -:)

ChrisOctagonChrisOctagon

This looks weird to me. Why are you using the cloudforce.com domain in the first place? :) I think that cloudforce may just be a thin veneer over regular naX.salesforce.com instances. When you log into the web ui, what instance does it report?

Chirag MehtaChirag Mehta

Thanks for replying!

 

We are doing some development related to cloudforce, so we have this irregular *.cloudforce.com instead of *.salesforce.com (and listen me they are exactly same, no difference in UI, setup or etc except this chatter rest api -:( ..)

 

When I login via browser the url that appears after login too is *.cloudforce.com/home/home.jsp.

 

 

LoganLogan

There are several reasons why a particular organization or user may not provide access to the API, although this particular error is new to me.  I suggest you check the following

 

0. check other chatter api endpoints are working against that org.  if not, try the below:

   - check if the org has IP restrictions on -   

   - make sure the user you're using has the "api enabled" user profile perm on and has chatter on.

 

1. if its only that endpoint that's giving you problems, post the exact post body, URL, user type etc here or file a case with the same so the appropriate salesforce team can take a look.

Chirag MehtaChirag Mehta

Thanks for your reply, Logan!

 

The org doesn't have any API restrictions and even the user does have API Enabled permission. This is evident from successful login response, with token and instance_url returned as part of login.

 

Endpoint is https://evently-31.cloudforce.com

Error is Destination URL not reset

Chatter REST URL (where request is sent) :

https://evently-31.cloudforce.com/services/data/v23.0/chatter/users/userID/photo

LoganLogan

web login and even Oauth is unrelated to the api and user profile perms - they only apply to API access so you should check them.  

 

I've heard anecdotally however that there is an active investigation on this issue, don't know what the status is.

pmasonpmason

Hi Chirag

 

We have opened an internal investigation for this issue. Please open a case with our support team and we can keep you updated.

 

Reference 'W-1224504' in the case description for our support team to know that we have an investigation open.

 

Regards

Paul Mason

Salesforce.com

 

 

Chirag MehtaChirag Mehta

Ok, that's great news. Hope to hear a solution soon! 

 

Raised case 07375766 @ my developer org Help Portal.

Chirag MehtaChirag Mehta

@Paul - any updates on this? (sorry for pushing so hard, but this been stuck from last 2 weeks now)

pmasonpmason

Hi Chirag

 

I have reached out to necessary parties with several internal cloudforce.com queries and to expedite my access to this org. This will allow me to analyze your issue internally.

 

I'll be keeping our support team updated on the latest progress (as i suspect they should update you with the above information when you come online today).

 

I've taken note that you've been stuck on this for over 2 weeks, and aim to get a productive update for you as soon as possible.

 

Regards

Paul Mason

Salesforce.com

Chirag MehtaChirag Mehta

Hi Paul,

 

Thanks for reply,  Let me know if anything else is required from my side. Yes it's been 2+ weeks, and no success yet. Thanks for expediting the request, and hope to see a productive update soon.

 

 

Chirag MehtaChirag Mehta

Paul - Any updates on this?

VidhyaVidhya

Hi Chirag,

 

In your initial post, it looks like you are trying to upload photo from within salesforce using REST APIs.

 

"

I'm trying to upload photo using chatter rest api, and its working great for test.salesforce.com and login.salesforce.com.

 

I'm able to login using OAUTH, do get in response instance_url, acess_token etc, and I set the instance_url in my photo upload request and its works great only when my instance_url is a nxxx.salesforce.com or c**.salesforce.com (ie it works for valid salesforce production and sandbox instances)."

 

It would be great if you could send me the code piece to do the same.

 

I am trying to use SF rest calls to post chatter private message from Apex and I am not sure how to start.

http://boards.developerforce.com/t5/REST-API-Integration/Calling-SF-existing-Rest-API-s-within-apex/td-p/429081

 

 

 

 

Chirag MehtaChirag Mehta

@Vidhay - Sorry that I didn't mention this, but I'm using chatter rest api in JAVA (and not apex).

Seb OrtizSeb Ortiz
Hi, did you get any solution from SF support? I'm dealing with the same error in a *.cloudforce.com instance calling REST API
I can get the access_token succesfully but any /resource I call I get the URL_NOT_RESET error.

Worst thing is that I cannot connect to any API based tools like Data Loader, Workbench or even Developer Console. All of them return the same error.

Please help
Thanks
Chirag MehtaChirag Mehta
Hi Seba,

I tried to recollect from my emails, discussion with salesforce support and to my knowledge salesforce premium support (including R&D) opened up something at their end and then it started working. To be frank, unable to recollect as its been almost 2.5 years since I did this.

Sorry cant be more helpful here!

Chirag