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
// Add support for environmental variables | |
require('dotenv/config'); | |
// Import botkit package | |
var Botkit = require('botkit'); | |
// Create a controller for the Slackbot | |
var controller = Botkit.slackbot({ | |
debug: false | |
}); |
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 sdk = require('messagemedia-messages-sdk'); | |
const controller = sdk.MessagesController; | |
// Configuration parameters and credentials | |
sdk.Configuration.basicAuthUserName = "YOUR_API_KEY"; // Your API Key | |
sdk.Configuration.basicAuthPassword = "YOUR_SECRET_KEY"; // Your Secret Key | |
var body = new sdk.SendMessagesRequest({ |
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
from message_media_messages.message_media_messages_client import MessageMediaMessagesClient | |
import json | |
# Configuration parameters and credentials | |
auth_user_name = 'YOUR_API_KEY' # The username to use with basic/HMAC authentication | |
auth_password = 'YOUR_API_SECRET' # The password to use with basic/HMAC authentication | |
use_hmac_authentication = False # Change to True if you are using HMAC keys | |
client = MessageMediaMessagesClient(auth_user_name, auth_password, use_hmac_authentication) |
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
<?php | |
require_once "vendor/autoload.php"; | |
use MessageMediaMessagesLib\MessageMediaMessagesClient; | |
use MessageMediaMessagesLib\APIHelper; | |
$authUserName = 'YOUR_API_KEY'; // The API key to use with basic/HMAC authentication | |
$authPassword = 'YOUR_API_SECRET'; // The API secret to use with basic/HMAC authentication | |
$useHmacAuthentication = false; // Change to true if you are using HMAC keys |
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
package com.company; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
import com.messagemedia.messages.MessageMediaMessagesClient; | |
import com.messagemedia.messages.controllers.MessagesController; | |
import com.messagemedia.messages.models.SendMessagesRequest; | |
import com.fasterxml.jackson.core.type.TypeReference; | |
public class Main { | |
public static void main(String[] args) throws Throwable { |
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
require 'message_media_messages' | |
require 'pp' | |
# Configuration parameters and credentials | |
auth_user_name = 'API_KEY' # The username to use with basic/HMAC authentication | |
auth_password = 'API_SECRET' # The password to use with basic/HMAC authentication | |
use_hmac = false # Change this to true if you are using HMAC keys | |
client = MessageMediaMessages::MessageMediaMessagesClient.new( | |
auth_user_name: auth_user_name, |
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
using System; | |
using MessageMedia.Messages; | |
using MessageMedia.Messages.Controllers; | |
using MessageMedia.Messages.Models; | |
namespace TestCSharpSDK | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"github.com/messagemedia/messages-go-sdk" | |
"github.com/messagemedia/messages-go-sdk/messages_pkg" | |
"github.com/messagemedia/messages-go-sdk/models_pkg" | |
) |
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
function retrieveWebhook(){ | |
var controller = setup(); | |
var page = 0; | |
var pageSize = 0; | |
controller.retrieveWebhook(page, pageSize, function(error, response, context) { | |
console.log(response); | |
}); | |
} |
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
function deleteWebhook(){ | |
var controller = setup(); | |
// The id of the webhook that you would like to delete | |
var webhookId = "WEBHOOK_ID"; | |
// Call the function that deletes the webhook | |
controller.deleteWebhook(webhookId, function(error, response, context) { | |
console.log(response); | |
}); |
OlderNewer