Rover authentication with Postman - HearstCorp/rover-wiki GitHub Wiki

Follow this guide to enable Postman to authenticate against a Rover instance

Add a new Postman environment

Click the cogwheel in the top right corner of Postman and select "Manage environments". Set the name for the environment (i.e. "prod-rover") and add the following data

Key Value
clientID your rover client id
clientSecret your rover client secret

After adding the new environment, select it in the environment selector to the left of the settings cogwheel.

Add auth headers

Add the following data to the Headers tab

Key Value
Authorization {{authClient}}
Timestamp {{authTimestamp}}
Signature {{authSignature}}

Note: the values in {{ }} braces are not placeholders - they are the literal values you should add.

Add signature pre-request script

Paste the following code in the Pre-request Script tab

var authClient = "Doorman-SHA256 Credential=" + environment["clientID"];
var authTimestamp = Math.floor(Date.now() / 1000);
var hash = CryptoJS.SHA256(environment["clientID"] + environment["clientSecret"] + authTimestamp)
var authSignature = CryptoJS.enc.Hex.stringify(hash);

postman.setEnvironmentVariable('authClient', authClient);
postman.setEnvironmentVariable('authTimestamp', authTimestamp);
postman.setEnvironmentVariable('authSignature', authSignature);

Make requests

Postman should now be able to make authenticated requests to rover. Make sure to have the correct environment selected for the rover instance that you are trying to reach, in order for the correct client id/secret to be used for signature generation.