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
Suman Kumar PatroSuman Kumar Patro 

Need help on UPS and salesforce integration

Hello,

I want to integrate saleforce with UPS to get data from UPS.
I tried with REST API using this request body.

{"UPSSecurity": { "UsernameToken": { "Username":" username1", "Password":" password1" }, "ServiceAccessToken": { "AccessLicenseNumber":"AccessLicenseNumber1" } }, "LoginAcceptTermsAndConditionsRequest": {"Request":"" }}

I am proving correct credential but getting authentication error.

same credential is working in python application but there we are using SOAP API.

Thanks in advance for help.
 
sharathchandra thukkanisharathchandra thukkani
authentication mechanism is not same for SOAP and REST API. Request you check the REST API developer guide for teh quick start.

https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/
Suman Kumar PatroSuman Kumar Patro
i am testing from postman app , there also i am getting same error. 
sharathchandra thukkanisharathchandra thukkani
have you created connected app in your salesforce org and are you using those connected app Consumer Key and Consumer Secret in postman app.?
Suman Kumar PatroSuman Kumar Patro
Hello sharath,

May be i did not exoplain the requirment well. Here i am not logining to salesforce .
Request gos form salesforce to ups. Getting error on from ups not from salesforce.(Here this is REST API)
I have post the same request body from Postman rest client, still that is not working. So issue is not in salesforce.

But i need this solution using REST only... i need that help... if anyone having experince in integrating with UPS.

Thanks,
Suman Kumar Patro

 
sharathchandra thukkanisharathchandra thukkani
so you are using apex callout to do this?
in that case you need to check whether the request body is proper or not. also request you to cross check whether you created entry in remote site settings in salesforce to make the callout.