Currently this is still in Beta. Only GET
and POST
methods are impemented. Use it with caution.
- Download Twilio.postman_collection.json from this repo
- In postman click on [Import] and choose the json file (this can take a while since there are 800+ requests)
The Twilio Collection is set to use the following two variables for authentication:
{{twilio_account_sid}}
: Account SID{{twilio_auth_token}}
: Auth Token
You can add all your accounts using the Postman Environment:
- Click on the gear on the top right of the postman window:
- Click the [Add] button and add the two variables mentioned above:
- Save
Now everytime you need to use this credential, use the dropdown list in the top right of Postman Window:
Let's say you want to send a new SMS. This is how you can do it:
- Opent the
Twilio REST API
collection - Open the
api
subfolder - Open the (first)
Messages
subfolder - Click on the
POST Send a message from the account used to make the request
request. The request will open on the main Postman window - Click on the
Body
tab and then fill up the values forBody
,From
andTo
. Also make sure that the checkboxes next to these three keys are enabled - Click on
Send
This repo is using the script convert.js
to convert the API definitions defined in this repo. Since these files are in Open API format, they could be directly imported in Postman; the problem is that postman create folders based on URL folder, which is not an effective way with Twilio APIs.
The script is:
- Processing each file in
src
folder. It uses the file name to create the name of the folder in Postman - Each
path
in the source file is used to create a subfolder of request - Each request is named using:
<method> + <resource>
. So for example aGET
to anaccount
is named asFetch account
To generate a new output file use:
node convert.js