Skip to main content

Message Status Changes

Introduction​

The GO4Network platform provides a robust webhook system to keep users informed about various events. One crucial event is the "Message Status Change," triggered when the status of a message changes. Register your endpoint in GO4Network Console and go to Webhook Menu, when message status change GO4Network will dispatch event to your endpoint.

Message Status Change Event​

The Message Status Change event is fired when the status of a message changes. Below are the attributes of this event:

  • short_message_id: Short Message ID.
  • task_hash: A unique identifier for the task associated with the message.
  • message_status: An instance of the MessageStatus enum representing the new status of the message.
  • error_code: An optional attribute indicating any error code associated with the message status change.

Payload Structure​

The payload sent to users' webhooks is structured as follows:

'data': [
'short_message_id' : 1,
'task_hash' : "xxxxYYYYzzzz1234",
'message_status' : MessageStatus,
'error_code' : MessageErrorCode,
]

Message Status​

The Message Status represents the various statuses that a message can have. Below are the possible values:

  • (1) Scheduled: The message is set to be sent at a future date and time.
  • (2) Pending: The message is in the queue, awaiting processing.
  • (3) Sending: The message is currently in the process of being sent.
  • (4) ReSending: The message is undergoing a resend operation.
  • (5) Sent: The message has been sent successfully.
  • (6) Delivered: The message has reached its intended recipient successfully.
  • (7) Failed: Delivery of the message has encountered an issue. Users can choose to "Resend" from the table action menu.
  • (8) Cancelled: The message delivery process has been terminated. Users can choose to "Resend" from the table action menu.

Message Error Code​

The Message Error Code provides error codes associated with message status changes. Here are the error codes and their meanings:

  • (0) E_NONE: No error, the message status change occurred without any issues.
  • (1) E_NO_ROUTE: The message couldn't find a valid route for delivery or there are no online or available devices.
  • (2) E_EXPIRED: The message has expired before being delivered.
  • (3) E_UNDELIVERABLE: The message is undeliverable for some reason.
  • (4) E_TIMEOUT: The delivery process for the message has timed out.
  • (5) E_SERVER_ERROR: The delivery process for the message has timed out.

Forwarding to User's Webhook​

To ensure users receive timely updates, GO4Network will be forwarding the event to the specified webhook URL.

Conclusion​

By leveraging the "Message Status Change" event and the webhook system, users can stay informed about the status of their messages in real-time. For further assistance or inquiries regarding webhooks, please contact our support team at technical@go4.network.