Connecting to the SOAP API Using Ruby on Rails
This page contains information on connecting your development environment or other systems to the Marketing Cloud SOAP API using Ruby on Rails.
You can use the connection to the SOAP API to test your calls and perform various tasks, such as sending email and retrieving tracking information.
You must download and install the following in order to connect to the SOAP API via Ruby on Rails:
- soap4r (soap4r-ruby19 if using Ruby v1.9)
Marketing Cloud also provides a full Ruby on Rails SDK for connecting your environment and developing your projects.
Follow the directions below to connect to the SOAP API using Ruby on Rails:
The sample code below demonstrates how to connect and interact with the SOAP API.
You can generate your own Ruby on Rails drivers using wsdl2ruby.rb and typing the following command in your command line.
Executing a Ruby on Rails File in a Shell
Use the following syntax to execute a Ruby on Rails file in a shell:
Authenticating your Environment to the SOAP API
Use the sample code below to authenticate your Ruby on Rails environment to the SOAP API: