Search code examples
twiliotwilio-api

Twilio SMS Error - Status 401, Code 20003 - Postman


I'm trying to send SMS using Twilio from my PHP code and Postman but it always returns the error below. I confirm everything is correctly set and everything was working months ago.

  1. SID and TOKEN are correct and verified 5 times
  2. Auth method is correct and the error persists also via test on Postman
  3. The query is correct and it is the same as the test SMS sent from the Twilio console

Error:

{
"code": 20003,
"message": "Authenticate",
"more_info": "https://www.twilio.com/docs/errors/20003",
"status": 401
}

enter image description here

enter image description here


Solution

  • It seems the account sid used for Basic Auth is different from the one shown in the URL. Try to align the two of them and it should work.