• douglivesey
  • NEWBIE
  • 0 Points
  • Member since 2010

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

Hi -- I'd really like to have a workflow send complex object data in XML, or preferably JSON, formatted data in the body of a POST request to the URL of a web service.

I know that SF can send a URL, but is what I want possible?

Does anyone know of anything on the AppExchange that might allow us to do this?

Or would this be something we need to contract to an Apex developer?

Thanks for any & all assistance,

   Doug.

I'm following this tutorial:

https://na6.salesforce.com/help/doc/en/remoteaccess_oauth_web_server_flow.htm

 

When I get to the final step - requesting the auth token - I always get an undocumented "unsupported_grant_type" message. Seems like this is some kind of generic error message, but I can't get around it.

 

I correctly retrieve a code form the initial GET request. Fine.

I generate a POST using that code:

 

POST /services/oauth2/token HTTP/1.0 Host: login.salesforce.com User-Agent: Drupal (+http://drupal.org/) Content-Length: 300 grant_type=authorization_code&code=aPrxVyeZrusRBnc3MMnY7pNlQsARBRDqXQTQ12UzEIDjUBJjlgXOq4_IUp.9E3k%3D&client_id=XXXXXXXXXXXXX&client_secret=XXXXXXXXXXXXX&redirect_uri=https%3A%2F%2Flocalhost%2FRestTest%2Fsalesforce%2Foauth

 

And the response is always the same:

 

{"error":"unsupported_grant_type","error_description":"grant type not supported"}

 

Everything is properly url encoded, and I've followed the directions to a T.

Any ideas?