Vision 6

getMessagePreviewUrl

Returns the publicly sharable Message preview url.

getMessagePreviewUrl

Returns the publicly sharable Message preview url.

Top ↑

Syntax

array getMessagePreviewUrl( string api_key, int message_id );

API Key Access Level required: Limited access

Parameters

api_key (string)

The key required to access the API. See Getting Started for more information.

message_id (int)

The ID of the Message.

Return Value

Returns the publicly sharable Message preview url.

Examples

PHP

$message_id = 1234567;

$api                 = new Api($url, 'YOURAPIKEY');
$message_details     = $api->invokeMethod('getMessagePreviewUrl', $message_id);
$message_preview_url = $message_details['message_preview_url'];

JSON Request

{
    "id": 1,
    "method": "getMessagePreviewUrl",
    "params": [
        "YOURAPIKEY",
        1234567
    ]
}

JSON Response

  {
      "id":1,
      "result":{
          "message_id":1234567
          "message_preview_url":"https://www.vision6.com.au/m/message/email/view.php?id=17544&u=5674&k=vl3QEVuocgvRzr748vMwmkkeEG8KJMi0CQbxgzpXKUU"
          "message_type":"email"
      },
      "error":null
  }

Remarks

The following table shows the values that are getMessagePreviewUrl returned.

Field Type Description
message_id int ID of the Message.
message_preview_url string The publicly accessible message preview url
message_type string The type of the message Message preview. Can be email.

Error Codes

This method may return the following error code in addition to the standard error codes:

Code Error Description
307 Unable to load Message The system could not load message_id.
333 Unable to load Message Preview The system could not load the message preview.

See Also