SparkBot icon

SparkBot

Interact with SparkBot WhatsApp API

Actions148

Overview

This node allows users to send custom API requests to the SparkBot WhatsApp API by specifying arbitrary endpoints, HTTP methods, headers, URL parameters, and JSON bodies. It is useful when you want to interact with parts of the API that are not covered by predefined operations or need full control over the request details.

Common scenarios include:

  • Accessing new or experimental API endpoints before they are integrated into the node.
  • Performing complex queries or actions requiring custom headers or parameters.
  • Debugging or testing specific API calls without building a separate integration.

For example, you could send a POST request to /messages/send with a custom JSON body to send a message, or a GET request to /contacts/list with URL parameters to filter contacts.

Properties

Name Meaning
API endpoint The URL path appended to the base URL https://api.soyspark.com/v1. Example: /messages
HTTP Method The HTTP method for the request. Options: GET, POST, PUT, PATCH, DELETE
Headers Key-value pairs of HTTP headers to include in the request
URL Params Key-value pairs of URL query parameters to append to the request URL
Body JSON-formatted string representing the request body. Required only for POST, PUT, PATCH, DELETE

Output

The node outputs the JSON response from the SparkBot API call under the json field. This typically contains the data returned by the API endpoint invoked, such as message status, contact information, or error details.

If the API returns binary data (not typical for this node), it would be included in the binary output fields, but this node primarily handles JSON responses.

Dependencies

  • Requires an API key credential for authenticating with the SparkBot WhatsApp API.
  • The base URL used for requests is https://api.soyspark.com/v1.
  • No additional external dependencies beyond standard HTTP request capabilities.

Troubleshooting

  • Invalid Endpoint or Method: If the API endpoint path or HTTP method is incorrect, the API will return an error. Verify the endpoint path and method match the SparkBot API documentation.
  • Authentication Errors: Ensure the API key credential is correctly configured and has necessary permissions.
  • Malformed JSON Body: For methods requiring a body, ensure the JSON is valid and matches the expected schema.
  • Header Issues: Incorrect or missing headers (e.g., Content-Type) may cause request failures.
  • URL Parameter Encoding: Make sure URL parameters are properly encoded to avoid malformed URLs.

Common error messages come directly from the API and usually indicate issues like unauthorized access, resource not found, or validation errors. Review the API response message for guidance.

Links and References

Discussion