This REST API will send a prerecorded audio file through your TextP2P account to one recipient at a time.
The client should make a http post using the following post parameters below.
POST PARAMETERS:
AUTH_USERNAME => <your textp2p login email>
AUTH_SECRET => <from your textp2p application screen>
PHONE => 5554442272
AUDIOFILE => https://app.textp2p.com/audio/file.wav
CALLERID => 7037771111 (optional)
SENDDATE =>2019-01-15 14:43:46 (optional)
Note:
- If CALLERID is not set it will use your TextP2P virtual number.
- SENDDATE should be the format YYYY-MM-DD HH:MI:SS. If not set, it will send immediately
- AUDIOFILE should be a recording less than 1 minute and the size should be less than 1 MB. It can be hosted wherever you choose as long as it's publicly accessible.
RETURN:
If successful it will return an HTTP response code of 200. An error will return 400, 401 or 404.
Curl Examples:
# App no date
curl -v -d "AUTH_USERNAME=testing@textp2p.com&AUTH_SECRET=c75bk434kl34ll34lk2h4hldd8asdf&PHONE=5551112222&AUDIOFILE=https://app.textp2p.com/uploads/audios/1-2021-12-30T222005.727Z.wav" https://app.textp2p.com/api-sendrvm.php
# App with date
curl -v -d "AUTH_USERNAME=testing@textp2p.com&AUTH_SECRET=c75bk434kl34ll34l456$hldd8asdf&PHONE=5551112222&SENDDATE=2022-01-29 14:43:46&AUDIOFILE=https://app.textp2p.com/uploads/audios/1-2021-12-30T222005.727Z.wav" https://app.textp2p.com/api-sendrvm.php
Comments
0 comments
Please sign in to leave a comment.