RightSignature 4 Target URL Question (NOOB)

  • 1
  • Question
  • Updated 3 weeks ago
Hi. I am new to API. I am using mailparser.io to parse emails and they can pull email and name out of our orders. I'd like to use their webhook generator to make RS4 send a reusable template I've created to the customer every time we receive an order for signature. I understand from reading the documentation that I'm supposed to use a POST request. mailparser.io has a form that I can fill out and opt to use JSON and POST as the type of request. They say they don't require API keys (though maybe RS4 does, I'm not sure I understand this.) I'm just not sure what to enter into the target URL field to send the request to RS4. Can anyone help? I have the dynamic URL names of the fields as they are named by our mailparser.io. I don't see what the ID of the reusable template is or how to direct mailparser.io to it. Any help would be greatly appreciated!!
Photo of Jonathan Davis

Jonathan Davis

  • 23 Posts
  • 0 Reply Likes

Posted 1 month ago

  • 1
Photo of Kelly Leeman

Kelly Leeman, Employee, Software Engineer

  • 90 Posts
  • 5 Reply Likes
Hi Jonathan, 

We have 2 types of authentication for our RS4 api, oauth2 and private token. Documentation on this can be found https://api.rightsignature.com/documentation/authentication.  The main difference is if you want users to authenticate and sent the templates as themselves you would use oauth 2.  For your purposes it sounds like you want to use the private token and have requests generated by the api token owner.  You will need to go into your RS4 account and request a token.  You will need to get the callback url form mailparser.io.  Once your request is approved you can view your api token in the web application.  You then need to encrypt this token and pass it in as a header on your http request.  The key is Authorization and the Value is Basic $base64encrypted token. You will need to include this header on all of your requests.

There are 2 ways to obtain your template id.  The easiest is to log into the app and click on details for the template and then the id will be in the url when viewing the template.  The other option is to make an api call documented https://api.rightsignature.com/documentation/resources/v1/reusable_templates/index.en.html

One you have your template id you make a post like that documented https://api.rightsignature.com/documentation/resources/v1/reusable_templates/send_document.html

You may want to use an application like postman to test out your workflows.


Photo of Jonathan Davis

Jonathan Davis

  • 23 Posts
  • 0 Reply Likes
This is what I'm getting. It's still coming back as code 400. Let me know what you've gotten as an encode whenever you have time. Thanks.
Photo of Jonathan Davis

Jonathan Davis

  • 23 Posts
  • 0 Reply Likes
The passed is just the message. I'm still getting code 400
Photo of Kelly Leeman

Kelly Leeman, Employee, Software Engineer

  • 90 Posts
  • 5 Reply Likes
your key is encrypted incorrectly.  But you should still delete the posts that include it.  You must have included a leading or trailing white space or something when you encrypted.  I will email you in the next few minutes
Photo of Jonathan Davis

Jonathan Davis

  • 23 Posts
  • 0 Reply Likes
Thanks so much! I had thought of that yesterday and thought I had eliminated the space but clearly I messed something up. I've got both the POST and the GET working smoothly now in mailparser.io. Any chance you could help me with that longer message and including line breaks in it? That's the last piece of the puzzle for me and I'll be a happy camper! You rock!
Photo of Kelly Leeman

Kelly Leeman, Employee, Software Engineer

  • 90 Posts
  • 5 Reply Likes
maybe try html?  if regular line breaks aren't working.