getMessageStatus method

Future<APIResponse<MessageInfo>> getMessageStatus(
  1. String messageId
)

Gets the latest status of the message. The last seven days message queue logs are kept. If you try to get the status of a message that has been submitted earlier, this method returns null for MessageInfo.

If the client library key is set to enforce session, an active user session is required (e.g., user needs to be logged in) to call this method.

messageId The id of the message

If successful, returns status information about the submitted message

Implementation

Future<APIResponse<MessageInfo>> getMessageStatus(String messageId) async {
  var res = await _fetcher.get<Map<String, dynamic>>(
    '/_api/rest/v1/queue/$messageId',
  );
  return APIResponse(
      errors: res.errors,
      data: res.data != null ? MessageInfo.fromJson(res.data!) : null);
}