SOLVED

Can we have a Marketo webhook going to another instance?

Go to solution
Yazmin_Padilla
Level 1

Hoping anyone can offer some insights. I'm trying to create a webhook that will insert an activity log entry on another instance. However I cannot even get the authentication token, the call times out. I'm wondering if the call between instances is possible at all or if I am setting up my webhook wrong. 

I've tried Get, and Post just to try it, but neither works. I can however setup webhooks to salesforce the same way and they work fine. 

Any help is appreciated. 

 

auth-webhook.png

1 ACCEPTED SOLUTION
SanfordWhiteman
Level 10 - Community Moderator
Some instances can do this and some can't. It depends on the networks they have in common, and Marketo doesn't guarantee the routing will work.

Either way, this isn't the right way to use the REST API. Even when it apparently "works" you have a race condition where the access token can expire between the identity call and the next call.

Any use of the API should be mediated by an intermediate service. You call the service via a webhook and it connects to the other instance in turn.

View solution in original post

2 REPLIES 2
SanfordWhiteman
Level 10 - Community Moderator
Some instances can do this and some can't. It depends on the networks they have in common, and Marketo doesn't guarantee the routing will work.

Either way, this isn't the right way to use the REST API. Even when it apparently "works" you have a race condition where the access token can expire between the identity call and the next call.

Any use of the API should be mediated by an intermediate service. You call the service via a webhook and it connects to the other instance in turn.
Michael_Florin
Level 10

That's certainly possible. One instance sends the webhook, and the REST API of the other instance will consume it. You can even send a webhook within one instance.

 

Here's how the webhook looks like:

Michael_Florin_0-1749663396934.png

https://MUNCHKIN_ID.mktorest.com/identity/oauth/token?grant_type=client_credentials&client_id=abc&cl...


An important piece is the response mapping. You need to map the Bearer Token into a Marketo field, and use that field's token for the subsequent call in the header:

 

Michael_Florin_1-1749663580965.png