HTTP API - Send MMS: Difference between revisions

From Ultiroam User Docs
Jump to navigation Jump to search
(Created page with "=== 9.1         Request === '''POST <nowiki>https://gateway_ip/api/send_mms</nowiki>''' 9.2         '''Request Parameter''' {| class="wikitable" |'''Parameter''' |'''Type''' |'''Description''' |- | colspan="3" |'''Required Parameter''' |- |port |Interger | |- |title |String | |- |number |String |The phone number of the receipient |- |file_id |Interger |file_id can be 0 to 31. Each file uploaded by user through “'''<nowiki>https://gateway_ip/api/mms_file/f</...")
 
No edit summary
Line 1: Line 1:
=== 9.1         Request ===
'''POST <nowiki>http://gateway_ip/api/send_mms</nowiki>'''
'''POST <nowiki>https://gateway_ip/api/send_mms</nowiki>'''


9.2         '''Request Parameter'''
'''Request Parameters'''
{| class="wikitable"
{| class="wikitable"
|'''Parameter'''
|'''Parameter'''
Line 30: Line 29:
Will be in the MMS  as an attachment
Will be in the MMS  as an attachment
|}
|}
9.3         Response Parameter
'''Response Parameters'''
{| class="wikitable"
{| class="wikitable"
|'''Parameter'''
|'''Parameter'''
Line 55: Line 54:
|}
|}


=== 9.4         Example ===
=== Example ===


====== Request: ======
====== Request: ======

Revision as of 08:56, 8 May 2024

POST http://gateway_ip/api/send_mms

Request Parameters

Parameter Type Description
Required Parameter
port Interger
title String
number String The phone number of the receipient
file_id Interger file_id can be 0 to 31.

Each file uploaded by user through “https://gateway_ip/api/mms_file/f ile[file_id]”

Will be in the MMS as an attachment

Response Parameters

Parameter Type Description
error_code Integer Codes that may be returned:

202: Request has been accepted and will be processed later;

400: Request format is not valid 404:file is not found

500: other errors

sn String SN of the gateway
mms_id Integer mms_id represents the ID of an MMS and is used for subsequent querying of the sending status.

Example

Request:

curl -k --anyauth -u admin:admin -d  '{"port":0,"title":"Test","number":"12345","file_id":0}' -H "Content-Type:  application/json" https://gateway_ip/api/send_mms

Response:

{"error_code":200,"sn":"xxxx-xxxx-xxxx-xxxx","mms_id":1}