Node-RED

Updated 5 years ago

Integration

Node-RED can easily integrate with most of ClickSend's API endpoints. This means you can trigger multiple actions by creating a Node-Red flow.

All you have to do is create a logical flow of information all leading to a http request node shown below which calls the API endpoint you desire.

Add the following details to the HTTP request node:

  • Method: POST
  • URL: https://rest.clicksend.com/v3/sms/send
  • Check Use basic authentication
  • Username: your ClickSend Username
  • Password: your ClickSend API Key which can be found here.
  • Return: a parsed JSON object
  • Name: Send SMS

Make sure you send the body of the request in JSON format.

Example:

Set up a simple flow like this:

Use inject node to create a JSON payload containing: 

{
            "messages": [
              {
                "body": "test message",
                "to": "{your number}"
              }
            ]
          }

You can add more parameters as shown in our API docs.

Put a debug node at the end so you can check the response from the API and turn it on by pressing the square on the right.

Make sure you deploy your flow and then press the square on the left to send the payload.



How Did We Do?

Powered by HelpDocs (opens in a new tab)