
Using CURL
All examples in the Integration Workshop make use of the CURL program that enables you to send HTTPs requests from the command line.
Install CURL
Download the executable for your environment and place it on the PATH. Type curl --version
in a command prompt to make sure the installation was successful.
User Credentials
To be able to use the REST API you will need to provide the credentials of a specific Xurrent user. All examples in the Xurrent Integrations Workshop use the user Howard Tanner (howard.tanner@widget.com) who has the Account Administrator role of the ‘Widget Data Center’ account. Howard’s password in Xurrent is 4me
.
The -u
option of CURL is used to specify the api-token (the password can be set to x as it is not used), like so:
curl -i -k -u "api-token:x" "https://api.4me-demo.com/v1/account"
Please note the following:
- -u: So in the example provided above, you need replace api-token with Howard Tanner’s actual API token. You can look up Howard’s API token when you are logged into Xurrent as Howard. To do so, click on the avatar of Howard in the upper right and select the option ‘My Profile’. Next, open the ‘API’ section on the left and click on the Reset API token button.
- -i: Interactive mode from CURL will show additional information like the response headers.
- -k: Disabled SSL certificate checking, should only be used in the demo environment.