9 Replies Latest reply on Jan 4, 2016 2:58 PM by Sanford Whiteman

    Calling Marketo REST API from a webook

    Grégoire Michel

      Dear all,

       

      Has anyone tried to Call Marketo REST API from a webhook ? I gather that this is not possible because of the Authentication issue, but I just wanted to know if anyone had ever tried and what were the outcomes.

       

      -Greg

        • Re: Calling Marketo REST API from a webook
          Jamie Lewis

          I have a question for you, what is the use case?  Are you using the webhooks to call a second instance of Marketo, or to update the same instance of Marketo?

           

          If it is a different Instance, you can just use two webhooks, one to authenticate and one to perform the action.

           

          If it is the same instance, then this will not be possible, you will have to call a webservice and then have that webservice relay the API calls.

          1 of 1 people found this helpful
            • Re: Calling Marketo REST API from a webook
              Grégoire Michel

              Hi Jamie,

               

              It's the same instance.

               

              I had come to that conclusion as well. Wanted to see if I had missed something.

               

              Any idea of a platform to quickly and efficiently develop such web services ?

               

              -Greg

                • Re: Calling Marketo REST API from a webook
                  Kenny Elkington

                  AWS Lambda seems to be becoming a popular choice for these types of small single-purpose services.  Load-balancing, environment and server-provisioning are completely abstracted away so you can focus on create the service that you want, without the infrastructure overhead.

                  1 of 1 people found this helpful
                    • Re: Calling Marketo REST API from a webook
                      Sanford Whiteman

                      We ported our entire webhook infrastructure to Lambda in August 2014. Overall, I'm glad-to-very-glad about the move, erring on the side of optimism about them plugging some functional gaps this year. 

                       

                      That said, Lambda alone is not the perfect fit for 'hooks that access reusable data such as an access token.  There is a disposable (=can be GC'd at any time) local environment in which you can persist data if you don't care about regenerating it when it goes away; I don't feel an access token falls into this category, although if you have a guaranteed very small # of calls per day it may be fine. Beyond that, you will need to add a persistence layer of your own (not within Lambda itself but probably somewhere else in the AWS ecosystem for speed).  Therefore, certain patterns that you might take for granted with, say, an existing PHP/MySQL setup where you never worry about persisting state (either in filesystem or db) become more complex with Lambda.  Still worth a strong look -- and yet containerized enterprise PHP hosting will be just as fast and scalable and may get you a familiar *MP stack built-in.

                      1 of 1 people found this helpful
                    • Re: Calling Marketo REST API from a webook
                      Jamie Lewis

                      You can build this using Python.