Salesforce Integration using OAuth 2.0 Client Plugin

Hi,

Has anyone come across an issue with integrating with Salesforce using the OAuth 2.0 Client plugin (forum.appian.com/.../summary)

I am trying to connect to Salesforce using the webserver flow (using refresh token). I have published the datastore for OAUTH_CREDENTIAL and set up third-party credentials as defined in the instructions. However, when I try to put the URL for the one time deployment, I get an error. In the logs, it says "Error no handler for -9; com.microsoft.sqlserver.jdbc.SQLServerException: The value is not set for the parameter number 1."

To give you some context, we want to refrain from using the Connector functions because we don’t want to access the Salesforce Objects directly due to scalability/maintenance/security concerns. We also tried using SOAP Services but there is an error parsing the xml response to a data dictionary format.

Let me know if anyone faced the same problem/how you fixed it or how you integrated with Salesforce?
Thanks!

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    Hi  you can use appian Integration object to generate oauth and call this integration object in header of an another Integration object to perform Create , Read , update or delete operation on Salesforce.

    Make sure to pass authentication url of salesforce as an url input into the first integration object including all the request parameters like username, password etc.. and Test the request, you might get a json response upon success, you need to parse this in a expression rule and return oauth token

    Create an another integration object, pass object url of salesforce in url field of this second integration object, configure Authorisation header having value as your expression rule (which parses the API response and returns "OAUTH your_token" including another header named account Content-Type and value could be application/json

    Hope this will help

  • Thanks !
    I am trying to create the first integration object to get the authorization code back but i keep getting the "error=redirect_uri_mismatch&error_description=redirect_uri%20must%20match%20configuration" error.
    We have configured the Callback URL to be "servername.com/.../callback" in both Salesforce and in the request parameter. I also tried doing "servername.com/.../code_callback.jsp" but that didn't work as well. Do you have any insight on this?
Reply Children
  • 0
    Certified Lead Developer
    in reply to hyejook223
    Hi Make sure you have configured proper authentication url followed by client_id, client_secret, username, password and grant_type as parameter (make sure parameter names and values must match to what salesforce service provider is expecting it to be) provided by salesforce. Here authentication mode should be None and method type as POST where Usage should be set to Queries Data.

    If All all these parameters are correct then you will be able to connect to salesforce and can get the response which will have OAUTH token in it.

    If still you are unable to communicate to salesforce, then I recommend try connecting to salesforce using any third party clients such as SOAPUI or POSTMAN etc.. if you are still unable to communicate using these clients too, then I believe there is something wrong from salesforce service provider side, and they need to resolve it.

    Hope this will help.