Get started with SOAP APIs
Last update: September 22, 2023
- Applies to:
- Campaign v8
- Campaign v8 Client Console
- Topics:
- API
CREATED FOR:
- Experienced
- Admin
- Developer
Learn how to generate a session token using Postman for use in API requests.

Transcript
Hello, and welcome to Getting Started with Soap APIs in Campaign. In this video, we are going to learn how to generate a session token using Postman for use in subsequent API requests. Let’s get started. First, we need to download and install the latest version of Postman. If you already have Postman, make sure it is up to date. Alternatively, the software Soap UI can be used in a similar fashion. Once you have Postman installed, one of the first things we need to do is import the API collection. However, to do this, we will need to upload a text file. The text file will need to be created by copy and pasting an XML file from your browser. Start by opening up a new Google Chrome tab and copy and paste the following link. In order for the link to work, you will need to modify the front part of the link to match the URL of the campaign instance you plan on using. You can find this value in the Connections tab for the Campaign Client Console. After modifying the link and pressing Enter in your browser, you will be asked to log in and provide your campaign credentials. Once you enter your credentials and log in, the following page is displayed. If you are already familiar with WSDL, you will know that WSDL is an XML format for describing network services as a set of endpoints. Every campaign instance will have this static endpoint, and by changing the parameter for the schema value, we can grab the XML file containing the endpoints we wish to use. Copy the entire XML file to a text document and save it to your local machine. Once complete, open Postman and from within the UI select Workspaces, followed by creating a new workspace. I am going to call my workspace CampaignCourse and change the visibility to Personal. After creating a workspace, we are ready to import our text file. From within the Collections tab, select Import and a popover appears. Normally, we could have just provided the link. However, because this is password protected, we have to make a text file. We can select Upload Files and navigate to our local files or drag and drop the text file. Once complete, the Name, Format, and Import As fields should match what I have on the screen. After importing the collection, we can select Collections from the left sidebar and the XTK Session collection is now available. We are now ready to generate our session token, which will be used for the remainder of the course. Scroll down and select Logon Post Request. Then, within the request, select the Body tab. A SOAP envelope is predefined and all we have to do is fill in some information. To send a valid post request, we will need to provide our login username, our password, and modify the base URL. Let’s start by modifying the base URL. If we hover over the variable, you will notice the base URL is using HTTP and not HTTPS. We need to modify this to use HTTPS for a valid post request. To modify a collection variable, select the Root Collection folder, in our case this is XTK Session, followed by selecting the Variables tab. Next, let’s update the initial value to contain HTTPS, followed by copy and pasting this to the current value. While we’re at it, I’m going to add my login credentials as variables I can call within the collection and create an empty variable where we can put our session token. Once complete, remember to save the changes. Navigating back to the logon post request, we can see that the base URL is now HTTPS. Because I created variables for my username and password earlier, I can add them into the body, replacing the string. Currently, we do not have a session token, however, we do not need to provide one and instead remove the string, leaving the value empty. Once complete, select Send in the top right corner and a response object populates. In this response is PSTR session token, which contains our session token value. We can copy and paste this value to our session token variable, meaning we won’t have to constantly copy and paste the value for subsequent post requests. Note that the session token only lasts 24 hours. After completing the response, save your changes to the post request for ease of use in the future. You should now have a campaign API collection in Postman and a session token to use for subsequent API calls. Thanks for watching.
Next video to watch: Step 2 - Add recipients and articles use SOAP API request
Previous pageTutorial - Use SOAP APIs
Next pageStep 2 - Add recipients and articles use SOAP API request