Created
July 19, 2018 00:55
-
-
Save IbrahimTareq/28a16423dfab08445a4028761486ec54 to your computer and use it in GitHub Desktop.
Code snippet on how to enable a key using the MessageMedia Signature Key Management Node.js SDK.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const lib = require('messagemedia-signingkeys-sdk'); | |
// Configuration parameters and credentials | |
lib.Configuration.basicAuthUserName = "API_KEY"; // The username to use with basic authentication | |
lib.Configuration.basicAuthPassword = "API_SECRET"; // The password to use with basic authentication | |
var controller = lib.SignatureKeyManagementController; | |
var body = new lib.EnableSignatureKeyRequest({ | |
"key_id": "7ca628a8-08b0-4e42-aeb8-960b37049c31" // Example of what a key_id could look like | |
}); | |
controller.updateEnableSignatureKey(body, function(error, response, context) { | |
console.log(response); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment