API Requests
This document explains how to make general requests to the SlideRoom API.
URL Format
The generic format for the API endpoint URL is:
https://api.slideroom.com/{organization code}/{resource}
Where {organization code} should be replaced by your organization code and {resource} should be replaced by the API resource you wish to use. Learn about currently available resources using the links in the sidebar. Your organization code is found under Settings > Account Information by clicking Show API Details.
Required Request Parameters
All requests require two parameters:
- email The email account you use to access the system
- expires When the request will expire in UTC seconds
- signature A computed signature. See Signing
Signing
All API requests must be signed using your API Access Key and API Hash Key. These keys are available upon request. Once your API keys have been created, they can be retrieved under Settings > Account Information by clicking Show API Details.
To generate a signature:
- Beginning with the list of request parameters (email, expires, and any resource-specific parameters), add your API Access Key with the parameter name access-key
- Each parameter should be formatted as {name}={value}
- Sort the list of name/value pairs alphabetically by name
- Join the name/value pairs into a single string, seperated by new lines
- Convert the string to lower case
- Generate a HMACSHA1 hash of the UTF8 byte array of the lower case string using a UTF8 byte array of your API Hash Key
- The generated hash should be Base64-encoded and then URL-encoded
- Append the result to the request string as a URL parameter using the parameter name signature
Example
For this example our API Hash Key will be 123, our API Access Key will be 456 and the Organization Code will be testorg.
To make a request for an export, we need the following parameters:
- email demo@demo.com
- expires 1383247011
- export test
- format txt
Add the access-key parameter and convert it to a string we can hash: access-key=456\nemail=demo@demo.com\nexpires=1383247011\nexport=test\nformat=txt
The generated signature (Base64 and URL-encoded) is TDeeYzbRCrCV4WKK8J6Rz6LM7XA%3D.
The final URL will be https://api.slideroom.com/testorg/export/request?email=demo%40demo.com&expires=1383247011&export=test&format=txt&signature=TDeeYzbRCrCV4WKK8J6Rz6LM7XA%3D
Success Results
All results are returned with a Content-Type of "application/json". For example:
{ submissions: 35, token: 120, message: "Message here" }
Error Results
Error results are in a standard format with a Content-Type of "application/json".
{ message: "Error message here" }
In some cases there will also be a property missing_parameters which will be an array of strings.