Search code examples
pythonsalesforcesalesforce-marketing-cloudsimple-salesforce

How to access the Salesforce Marketing Cloud through simple-salesforce


I am implementing a project using simple-salesforce so I can manage and trigger events on Salesforce Marketing Cloud. The problem I have encountered is that the documentation is not explicit if I can use simple-salesforce to access the Marketing Cloud endpoints.

I've noticed even that the login method on simple-salesforce can't be done by the Salesforce Marketing Cloud credentials. When I try to do this I get:

SalesforceAuthenticationFailed: INVALID_LOGIN: Invalid username, password, security token; or user locked out.

Did someone have the same issue? Can I access the Salesforce Marketing Cloud through simple-salesforce?


Solution

  • simple_salesforce is for the Salesforce CRM platform. It provides no support for Marketing Cloud, which has distinct APIs, of any kind. You'll need to use one of the Marketing Cloud SDKs instead.

    I am not a Marketing Cloud expert, but this appears to be the relevant official documentation for the Marketing Cloud SOAP API, and for the Python SDK. There's also a REST API that you can call with any Python HTTP client. There may also be third-party or community libraries available.