2 Step Authentication Delivery
If your clients remote system needs you to make an authentication call to gather a token before submitting the lead data, then this article should help you!
Before you start make sure you have guidance which details both requests (the authentication AND the lead Delivery request).
Lets start by creating a new Delivery with the "action" as 2 Step Delivery:
Time to populate the 1st request with your authentication call details.
Add your authentication endpoint to the URL, select the correct method and fill out the payload as appropriate. You can add tags here through the "show tag help" button as you normally would.
The final step of formatting the 1st request is to tell LeadByte how to capture the token being returned for use in the 2nd call.
This is done by selecting the "Response type" found under the payload builder.
Text will simply capture the entire string returned
EG text response - ABC123
JSON and XML allows you to choose a specific field name which will contain the Auth token
EG JSON response -
EG XML response -
Both of these tokens would be captured by populating the Auth token field with token -
CUSTOM provides you with options to fine tune exactly where you'd like LeadByte to capture the token from either using a "split by" function or looking for a keyword in your response. The (i) tooltips shown on the delivery screen provide all the information you might need here.
Time to populate the 2nd request with your lead delivery details.
Add your lead submission endpoint to the URL, select the correct method and fill out the payload as appropriate. You can add tags here through the "show tag help" button as you normally would.
You can tell LeadByte to populate the token you stored from the 1st request by using the [AUTHTOKEN] tag.
EG request body using tag
EG custom headers using tag:
Set your remote system response for the 2nd request as you normally would and test!
As always, please raise a support ticket if you have any issues. Make sure you save your Delivery and include the LeadByte URL in your ticket details.