I am new to both making API calls and coding in Apex and feel way over my head.
How can I make a call to the Marketo REST API through Salesforce? Is this possible through Apex?
For example, hypothetically, say I didn't want to use the automatic sync of Marketo and Salesforce for some reason. Would it be possible to use Apex to push a lead to Marketo manually using something similar to this:
When a new lead is created, trigger Apex class "syncLead"
syncLead requests token and logs in to Marketo from Salesforce, so I can use the Marketo API
syncLead makes an SOQL to Salesforce, and stores data for Lead01 as, for example, Map m
syncLead makes POST to create a new lead in Marketo using the information from Map m
Otherwise, is there another way to do this? Perhaps by linking to an external database through Salesforce?