2 Step Authentication Delivery

Follow

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).

 

Step 1

Lets start by creating a new Delivery with the "action" as 2 Step Delivery:

Capture.PNG

 

Step 2

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.

 

Step 3

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 - 

{
"status": "Success",
"token": "ABC123",
"expires": "Never"
}

 

EG XML response - 

<response>
<status>Success</status>
<token>ABC123</token>
<expires>Never</expires>
</response>

 

Both of these tokens would be captured by populating the Auth token field with token - 

Image 2023-01-03 at 11.19.37 AM

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.

 

Step 5

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

Capture.PNG

 

 

EG custom headers using tag:

Capture.PNG

 

Step 6

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.

Was this article helpful?
0 out of 0 found this helpful

Comments