Send a message

Version: 1.0.0
chat/send-message
superface

Send a text message to channel destination

Send Message

Sends message to one destination

Destination
Text
Message ID
Destination
Rate Limit

1. Install

npx @superfaceai/cli install chat/send-message

2. Use in your code

const { SuperfaceClient } = require('@superfaceai/one-sdk');

const sdk = new SuperfaceClient();

async function run() {
  // Load the installed profile
  const profile = await sdk.getProfile('chat/send-message');

  // Use the profile
  const result = await profile
    .getUseCase('SendMessage')
    .perform({
      destination: 'C1H9RESGL',
      text: 'Our app has 1,000,000 subscribers!'
    });

  return result.unwrap();
}

run();

3. Add providers