Skip to main content

Notifications

Small and medium business | Business Central, N...
Suggested answer

Business Central to Twilio API Request Error

Posted on by 25

Hello Experts,

i am trying to send request  from business central to Twilio (Send SMS)  i want to send SMS(text message to phone number) .i use my Twilio SID and Token no .which i created and get from my Twilio account.. ,i am sending the Post request as in below screenshot 1. screenshot2 is always i get error as 401. although same credentials works fine on Postman and i am able to send SMS without any issue.

1. so it is the correct format and the way i am using to send POST(Json format) request ?

2. if it is wrong one then what is the right way to send request to Twilio 

let me know if need more information.

ScreenShot1 1

6330.png

Screenshot 2.

pastedimage1660759218968v1.png

Thanks in Advance

Categories:
  • RE: Business Central to Twilio API Request Error

    i tried, but no luck.

  • Suggested answer
    Brad_P Profile Picture
    Brad_P 1,542 on at
    RE: Business Central to Twilio API Request Error

    Hi,

    A quick look, if you're using Basic Auth you'll need to Base64Enconde the User:Token value and pass that for authorization

  • RE: Business Central to Twilio API Request Error

    i tried, but no luck.

  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 32,748 Super User 2024 Season 1 on at
    RE: Business Central to Twilio API Request Error

    Try adding all your headers after you have filled in the httpcontent.

    Filling the httpcontent often deletes the headers you added prior to adding the content,

    A little perk of the AL httpclient.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,151 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,963 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans