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
Big EarsBig Ears 

Mailjet and Salesforce rest API - Getting Started

Hello all,

I've not dealt with the rest API before. I feel like I understand what the rest API should do, but not how the authentication really works. I've read the documentation, but it's not helping me to understand how best to implement. As a test, I'm trying to integrate the Mailjet Event API with some methods in Salesforce. The Mailjet event API has this to say:
The endpoint is an URL our server will call for each event (it can lead to a lot of hits !). You can configure it in your account preferences.

It must return a 200 Ok HTTP code if all goes well. Any other HTTP code will result in our server retrying the request later (up to 10 times, every 10 minutes). If the request if still failing after 10 errors, we stop trying.

We strongly recommend using a secure URL (HTTPS) in combination with a basic authentification to make sure data cannot be intercepted, and that only our servers can send you data.

Eg: https://username:password@www.example.com/mailjet_triggers.php

The event data is sent in the POST request body using a JSON object. Its content depends on the event.
All of the examples using the REST API that I've seen seem to make 2 calls. One to get the authorisation details and then a second one (usually a POST) to actually take some action within the Salesforce Org. My question is - Given that the Mailjet API seems to only make a single POST call, is it possible to authenticate this call? If so, how? Once authenticated, I think I understand how to handle the JSON that the Mailjet API will deliver. It's just getting authenticated which seems to be stumping me.

With thanks
Andy
 
Best Answer chosen by Big Ears
Big EarsBig Ears
Just to follow up - It's not currently possible to directly integrate the Mailjet Event API and the Salesforce Rest Webservices, due to the authentication requirements of Salesforce. A third party would be required to take the data from Mailjet. The third party would then need to authenticate against Salesforce Rest Webservices and implement any logic as required.

All Answers

Big EarsBig Ears
Just to follow up - It's not currently possible to directly integrate the Mailjet Event API and the Salesforce Rest Webservices, due to the authentication requirements of Salesforce. A third party would be required to take the data from Mailjet. The third party would then need to authenticate against Salesforce Rest Webservices and implement any logic as required.
This was selected as the best answer
Herley JonsonHerley Jonson
I'am not sure regarding this specific scenario, but Skyvia is on of the 3rd parties I've used at multiple projects.
They do support Salesforce and Mailjet as connectors, no coding needed. Here is the link (https://skyvia.com/data-integration/integrate-salesforce-mailjet)