SendingNetwork
  • OVERVIEW
    • Getting Started
    • FAQs
  • Network Instructional Articles
    • Basics
      • Introducing the Edge, WatchDog, and Guardian Nodes
      • Overview
      • Messaging Solution
      • Privacy Solution
      • Rich Communication Solution
      • Multi-Platform Solution
      • Decentralized Identity
      • Multiple Chat Modes
      • How It Works
      • Token Utility
      • The Team
    • Key Concepts
      • Decentralized Identity
      • Social Graphs
      • Edge Node
  • SDK Documentation
    • Glossary
    • JavaScript client SDK
      • DID
      • User
      • Message
      • Room
      • Contact
      • Social Graph
    • iOS client SDK
      • Push
      • DID
      • User
      • Message
      • Room
      • Contact
    • Android client SDK
      • User
      • Room
    • Java SDK
      • DID
      • Room
      • Message
    • Node.js SDK
      • DID
      • Room
      • Message
    • Unreal SDK
      • DID
      • User
      • Message
      • Room
    • Unity SDK
      • DID
      • Room
      • Message
    • Website chat widget SDK
      • Customization
      • DID
      • User
      • Room
      • Message
      • Other
    • Bot SDKs
      • Golang Bot SDK
        • DID
        • User
        • Room
        • Message
    • Extensible Message Interface
    • Push Notifications
    • Flutter SDK
      • DID
      • User
      • Message
      • Room
    • PHP SDK
      • DID
      • Room
      • User
    • Developer Key
  • Acquisition Kit
    • Social Boost Development Instructions
  • WatchDog Agent
    • WatchDog Agent Guide
    • WatchDog Agent Deployment Tutorial
      • Linux Deployment Tutorial
    • One-Click Deployment
  • Edge Node
    • Edge Node Deployment Tutorial
    • VPS Setup Guide
      • Google Cloud Platform (GCP)
      • Amazon Web Services (AWS)
      • Contabo
    • Check Node Stats with Auto-Reply Bot in SendingMe App
    • Alpha-3 Testnet FAQs
  • delegation node
    • Delegation Node Deployment Tutorial
  • Private Delegation Node
  • Use Cases
    • Wallet-to-Wallet Messaging
    • Dapp Notifications
    • Identity Verification
    • Gamer Acquisition
    • Cross-platform Trading
Powered by GitBook
On this page
  • Send text message
  • Send image
  • Send notice
  • Get history message
  1. SDK Documentation
  2. JavaScript client SDK

Message

JavaScript Message APIs

Send text message

Name
Parameters Description
Response

sendTextMessage(roomId,body,txnId,callback)

  • roomId: room id

  • body: message content string

  • txnId (optional):transaction id

  • callback (optional):

N/A

Send image

Name
Parameters Description
Response

sendImageMessage(roomId,url,info,txnId,callback)

  • roomId: room id

  • url: image url

  • info (optional): image information

  • txnId (optional):transaction id

  • callback (optional):

N/A

Send notice

Name
Parameters Description
Response

sendNotice(roomId,body,txnId,callback)

  • roomId: room id

  • body: notice text string

  • txnId (optional):transaction id

  • callback (optional):

N/A

Get history message

Name
Parameters Description
Response

createMessagesRequest(roomId, fromToken, limit, dir)

  • roomId: room id

  • fromToken: Pagination identifier, pass an empty string for the first time, and pass the 'end' field returned from the previous call for subsequent calls.

  • limit : number of events per page returned by the backend API.

  • dir : direction, value is "b" | "f", where b: back, f: forward.

end: pagination identifier, if not returned, indicates completion of retrieval. chunk: retrieved event data, returned as an array.

PreviousUserNextRoom

Last updated 1 year ago