JSON API » messages » messages/text/get
Gets text message.
Input parameters
Requires authentication and the texts role privilege.
| Name | Type | Description | Required | Default value |
|---|---|---|---|---|
| auth_username | String | Authentication username. | Yes | |
| auth_password | String | Authentication password. | Yes | |
| uniqueid | String | Uniqueid of message to get. | Yes | |
| get_media_files | Integer | 0 to get message info only, 1 to download media files. | No | 0 |
| encoding | String | "base64" to return file base64 encoded, "raw" to return raw data. | No | "raw" |
Responses
| Code | Description |
|---|---|
| 200 | Success. |
| 401 | The authentication details provided are invalid. |
| 402 | Your role does not allow this. |
| 404 | The 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
| Version | Changes |
|---|---|
| 4.2 | Function added. |
