Callback has failed, pointing to salesforce org

  • 1
  • Problem
  • Updated 3 months ago
Dear Team,

I am trying to utilize Callback URL which is pointing to my salesforce org.
But its failing, here is the log details:

An document 'created' callback has failed for Document
2DXN3AJGVIFCG4PR8L8PT8.

HTTP Response Code: 401 Unauthorized
Callback URL: https://na35.salesforce.com/services/apexrest/
RightSignatureCallback?parentId=0Q0410000007V64CAE
Response Headers:
date: ["Wed, 14 Feb 2018 16:59:57 GMT"]
strict-transport-security: ["max-age=31536000; includeSubDomains"]
x-content-type-options: ["nosniff"]
x-xss-protection: ["1; mode=block"]
content-security-policy: ["upgrade-insecure-requests"]
x-robots-tag: ["none"]
cache-control: ["no-cache,must-revalidate,
max-age=0,no-store,private"]
set-cookie: ["BrowserId=nPWW5jtIQou2U2tiwX1Ejw;Path=/;Domain=.
salesforce.com;Expires=Sun, 15-Apr-2018 16:59:57 GMT;Max-Age=5184000"]
expires: ["Thu, 01 Jan 1970 00:00:00 GMT"]
www-authenticate: ["Token"]
content-type: ["application/json;charset=UTF-8"]
transfer-encoding: ["chunked"]
connection: ["close"]

Can you please help me with some out of box way to make this call.

Regards,
Anand
Photo of Anand @GoCloudz

Anand @GoCloudz

  • 8 Posts
  • 0 Reply Likes

Posted 3 months ago

  • 1
Photo of Kelly Leeman

Kelly Leeman, Employee, Software Engineer

  • 53 Posts
  • 4 Reply Likes
Please provide more details about the call you are making and the workflow that you are trying to achieve. 
Photo of Anand @GoCloudz

Anand @GoCloudz

  • 8 Posts
  • 0 Reply Likes
Using API's I am sending document for signature, which includes the call back URL details for future use. Whenever RightSignature server is trying to utilize call back URL, there is some authentication issue with salesforce org.
 
Photo of Kelly Leeman

Kelly Leeman, Employee, Software Engineer

  • 53 Posts
  • 4 Reply Likes
do you have a url that does not require authentication that we can call back too?  or can you include the authentication as part of the call back url?  Like passing in the token?
Photo of Anand @GoCloudz

Anand @GoCloudz

  • 8 Posts
  • 0 Reply Likes
Customer dont want to keep callback service public and I don't see any option to authorize call based on token. Is there any out of box option in RightSignature for one time authorization with salesforce org.
Photo of Kelly Leeman

Kelly Leeman, Employee, Software Engineer

  • 53 Posts
  • 4 Reply Likes
If I am understanding the issue correctly then it is something salesforce would need to provide.  How do you normally sign requests to salesforce?
Photo of Anand @GoCloudz

Anand @GoCloudz

  • 8 Posts
  • 0 Reply Likes
There is out of box functionality available in DocuSign. Same kind of feature  I was expecting here for one authorization.
Photo of Anand @GoCloudz

Anand @GoCloudz

  • 8 Posts
  • 0 Reply Likes
In salesforce there are multiple options for Authorization, but the problem is here the call back even in not in our control. 
Photo of Kelly Leeman

Kelly Leeman, Employee, Software Engineer

  • 53 Posts
  • 4 Reply Likes
We do have a salesforce integration.  Perhaps if you gave me links to the things you are trying to do i would have a better understanding.
Photo of Anand @GoCloudz

Anand @GoCloudz

  • 8 Posts
  • 0 Reply Likes
Refer my first post for error log and here is the call back URL: 
https://na35.salesforce.com/services/apexrest/
RightSignatureCallback?parentId=0Q0410000007V64CAE
Photo of Kelly Leeman

Kelly Leeman, Employee, Software Engineer

  • 53 Posts
  • 4 Reply Likes
Does salesforce have an authentication where you can can pass in a token as a query string parameter?  If so, then use this method and include it in the call back url.
Photo of Anand @GoCloudz

Anand @GoCloudz

  • 8 Posts
  • 0 Reply Likes
I am well aware about above approach. Just want to check possibility of any option with in RightSignature.  
Photo of Anand @GoCloudz

Anand @GoCloudz

  • 8 Posts
  • 0 Reply Likes
Also salesforce authentication is 2 step process. Its not going to work in our use case. Here is the reference document: https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_understanding_usernam... 
Photo of Kelly Leeman

Kelly Leeman, Employee, Software Engineer

  • 53 Posts
  • 4 Reply Likes
Oh ok, they are using oath2.  Thank you for that info, you had not previously included information about how you were authenticating.  We do not offer anything like what you are asking for.  You could host your own solution that receives the call back and then handle the auth into salesforce, but you cannot do what you are asking for directly from the callback on the docs endpoint.  Have you looked into our salesforce integrations to see if any of those meet your business needs?