First API POST request with Postman

  1. Add a new request by clicking the three dots next to SMS folder. Name it Create a message.


  2. In the comment tab, add the link to the create message API documentation: https://www.twilio.com/docs/sms/api/message-resource#create-a-message-resource


  3. Switch to build mode by clicking on the pen icon. Change the request type from GET to POST.
  4. Copy the url from the GET request from previous lab
  5. Click on Body tab to set the parameters for the create message API.
  6. Select x-www-form-urlencoded.
  7. Fill-in the create message API parameters: To, From, Body. You can also add a MediaUrl. Feel free to add your own medi url.


  8. The From parameter should be your Twilio trial number that you can copy from your twilio account console. You can add a variable for it in Twilio collection named TWILIO_NUMBER.


  9. Click Save, then Send.
  10. The body response indicates that the post request is successfully sent and a text message should be received on your phone.


  11. Go back to the Message log GET request and click on Send. You'll the message you've just sent added to the list in the Body response.
  12. If you've sent a media, you'll see a key named media. Click on the corresponding url.


  13. You will get a GET request which returns all media you've sent in this message. Save the request and click on Send.
  14. If your request is executed successfully, you can see in the Body response information about the media you've sent, including its uri.
  15. Click on the link next to uri. A second GET request is created which returns information about this specific media. If you remove the .json extension at the end, you can return the actual media.


  16. Check the response size which indicates that it is about 1MB. You can use the cacheability feature of the API client-server model.
  17. In the Response body, click on headers. The key last-modified indicates that it supports caching.
  18. Copy the date value and click on the headers tab of the request. Add the key if-modified-since with a value the copied date.


  19. Click on Send. Check the Body response which returned this time only the status not modified. This means that this API support cacheability.


teaching_assistant/api/postman_post.txt · Last modified: 2021/09/15 08:43 by Nour
Back to top
CC Attribution-Share Alike 4.0 International
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0