MessageMedia Signature Key Management NodeJS SDK
The MessageMedia Signature Key API provides a number of endpoints for managing key used to sign each unique request to ensure security and the requests can't (easily) be spoofed. This is similar to using HMAC in your outbound messaging (rather than HTTP Basic).
⭐️ Installing via NPM
Now install messagemedia-messages-sdk via npm by using:
npm install messagemedia-signingkeys-sdk
Alternatively, add the following to the dependencies section of your package.json:
"messagemedia-signingkeys-sdk": "^1.2.0"
🎬 Get Started
It's easy to get started. Simply enter the API Key and secret you obtained from the MessageMedia Developers Portal into the code snippet below.
🚀 Create a signature key
const lib = ; // Configuration parameters and credentialslibConfigurationbasicAuthUserName = "API_KEY"; // The username to use with basic authenticationlibConfigurationbasicAuthPassword = "API_SECRET"; // The password to use with basic authentication var controller = libSignatureKeyManagementController; var body = "digest": "SHA224" "cipher": "RSA"; controller;
📥 Get signature key details
You can get a key_id by looking at the id of the signature key created from the response of the above example.
const lib = ; // Configuration parameters and credentialslibConfigurationbasicAuthUserName = "API_KEY"; // The username to use with basic authenticationlibConfigurationbasicAuthPassword = "API_SECRET"; // The password to use with basic authentication var controller = libSignatureKeyManagementController; var keyId = "7ca628a8-08b0-4e42-aeb8-960b37049c31"; controller;
📥 Get signature keys list
const lib = ; // Configuration parameters and credentialslibConfigurationbasicAuthUserName = "API_KEY"; // The username to use with basic authenticationlibConfigurationbasicAuthPassword = "API_SECRET"; // The password to use with basic authentication var controller = libSignatureKeyManagementController; controller;
❌ Delete signature key
You can get the key_id by looking at the ids of the signature keys returned from the response of the Get signature keys list
example.
const lib = ; // Configuration parameters and credentialslibConfigurationbasicAuthUserName = "API_KEY"; // The username to use with basic authenticationlibConfigurationbasicAuthPassword = "API_SECRET"; // The password to use with basic authentication var controller = libSignatureKeyManagementController; var keyId = "7ca628a8-08b0-4e42-aeb8-960b37049c31"; controller;
☑️ Enable a signature key
You can get the key_id by looking at the ids of the signature keys returned from the response of the Get signature keys list
example.
const lib = ; // Configuration parameters and credentialslibConfigurationbasicAuthUserName = "API_KEY"; // The username to use with basic authenticationlibConfigurationbasicAuthPassword = "API_SECRET"; // The password to use with basic authentication var controller = libSignatureKeyManagementController; var body = "key_id": "7ca628a8-08b0-4e42-aeb8-960b37049c31"; controller;
📥 Get enabled signature key
const lib = ; // Configuration parameters and credentialslibConfigurationbasicAuthUserName = "API_KEY"; // The username to use with basic authenticationlibConfigurationbasicAuthPassword = "API_SECRET"; // The password to use with basic authentication var controller = libSignatureKeyManagementController; controller;
🚫 Disable an enabled signature key
const lib = ; // Configuration parameters and credentialslibConfigurationbasicAuthUserName = "API_KEY"; // The username to use with basic authenticationlibConfigurationbasicAuthPassword = "API_SECRET"; // The password to use with basic authentication var controller = libSignatureKeyManagementController; controller;
📕 API Reference Documentation
Check out the full API documentation for more detailed information.
😕 Need help?
Please contact developer support at developers@messagemedia.com or check out the developer portal at developers.messagemedia.com
📃 License
Apache License. See the LICENSE file.