JSON API » messages » messages/text/get

Gets text message.

Input parameters

Requires authentication and the texts role privilege.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
uniqueidStringUniqueid of message to get.Yes
get_media_filesInteger0 to get message info only, 1 to download media files.No0
encodingString"base64" to return file base64 encoded, "raw" to return raw data.No"raw"

Responses

CodeDescription
200Success.
401The authentication details provided are invalid.
402Your role does not allow this.
404The message does not exist.

Data returned

Fields corresponding to the text message.

Example: With required parameters

http://enswitch.example.com/api/json/messages/text/get/?auth_username=user;auth_password=password;uniqueid=abcd123

{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data": { "uniqueid":"1234567890", ..., "media_files_list" : [ { "filename": "abc.txt", "mimetype": "text/plain" } ], "media_files_data": { "abc.txt": "content of file" } }

Change history

VersionChanges
4.2Function added.