[Twilio Connector] Twilio Connector Demo
Question
Forge component by Eduardo Jauch

Hi, I have created my trial account, added the steps needed for authentication in the espace.  When I try to put in the credentials in the demo app in the browser I am getting the following error, can someone please help point me in the right direction.  Thank you in advance.

mvp_badge
MVP

Hello Peter.

Can you go to Service Center and share some more details on the error?

mvp_badge
MVP

Hi,

Did you change the mobile number that is used to send messages?
The one in the Demo app does not work.

In your trial account, you need to request a mobile number, and update the demo for it to work.

If you did that, could you see if there is any error message in Service Center?


Cheers. 

Thanks gentlemen, I did request a mobile number and have that in my trial account:  Here is the error message from service center:


Error detail

Back to Log

7ae791f0-9e0a-41b4-9b4e-57bc4818a39b

2020-09-16 16:04:47

f3d88107-5979-47e1-bf7a-8b99b6ebe03b

TwilioConnectorDemo

Users


LjqqusR0jEWDLiji9wZ15Q==

S8GE6-LTB2TH


Code: 20003; Message: Authenticate; Status: 401; More Info: 

eSpaceVer: Id=1854, PubId=0, CompiledWith=11.9.0.16900
RequestUrl: https://coredadi.outsystemscloud.com/TwilioConnectorDemo/Configuration.aspx (Method: POST)
AppDomain: /LM/W3SVC/32/ROOT/TwilioConnectorDemo-138-132447436526629562
FilePath: C:\OutSystems\Sandboxes\VDLXOB029\Platform Server\running\TwilioConnectorDemo\Home.aspx
ClientIp: 73.27.226.136
Locale: en-US
DateFormat: yyyy-MM-dd
PID: 10356 ('w3wp', Started='8/28/2020 1:11:18 AM', Priv=826Mb, Virt=2116631Mb)
TID: 13
Thread Name:
.NET: 4.0.30319.42000

Code: 20003; Message: Authenticate; Status: 401; More Info:
at ssTwilioConnector.CcTwilio.ActionCall_GetCalls(HeContext heContext, ICcTwilioCallbacks _callbacks, String inParamAccountSid, String inParamFrom, Int32 inParamPageSize, String inParamStartTime, String inParamStartTimeAfter, String inParamStartTimeBefore, String inParamStatus, String inParamTo, STCallList1Structure& outParamResponse)
at ssTwilioConnector.Actions.ActionTwilioCallList(HeContext heContext, Int32 inParamCount, String inParamFrom, DateTime inParamStartTime, DateTime inParamStartTimeAfter, DateTime inParamStartTimeBefore, ENCallStatusEntityRecord inParamStatus, String inParamTo, STCallList1Structure& outParamCallList)
at ssTwilioConnectorDemo.RsseSpaceTwilioConnector.MssTwilioCallList(HeContext heContext, Int32 inParamCount, String inParamFrom, DateTime inParamStartTime, DateTime inParamStartTimeAfter, DateTime inParamStartTimeBefore, IRecord inParamStatus, String inParamTo, IRecord& outParamCallList)
at ssTwilioConnectorDemo.Actions.ActionTwilioCallList(HeContext heContext, Int32 inParamCount, String inParamFrom, DateTime inParamStartTime, DateTime inParamStartTimeAfter, DateTime inParamStartTimeBefore, ENCallStatusEntityRecord inParamStatus, String inParamTo, STCallList1Structure& outParamCallList)
at ssTwilioConnectorDemo.Flows.FlowMainFlow.ScrnHome.Preparation(HeContext heContext)
at ssTwilioConnectorDemo.Flows.FlowMainFlow.ScrnHome.Page_Load(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

All I did was publish the demo and in the config section put in the Account SID, thats when I get this error.

mvp_badge
MVP

That error is authentication.

SID only is not enough. They mention Id and Token or API key and Secret. https://www.twilio.com/docs/usage/requests-to-twilio


Can you go to account dashboard to check if your account is active?


Nuno Reis wrote:

That error is authentication.

SID only is not enough. They mention Id and Token or API key and Secret. https://www.twilio.com/docs/usage/requests-to-twilio


Can you go to account dashboard to check if your account is active?


 I put in the API key and auth token in the espace in outsystems according to the documentation.  Just like below:

 

mvp_badge
MVP

But is your account active?

Nuno Reis wrote:

But is your account active?

 Yes its active otherwise they wouldnt have assigned a twilio phone number to me right?

 

I am able to send and receive test sms messages from twilio to my personal phone, I am also able to sms the number they have created for me, so this must be active.  Its something in that demo that is preventing me from using it.

mvp_badge
MVP

HI,

I'll take a look to see if there is a problem. It shouldn't, as it was working and nothing was changed...
As soon as I find the cause, I let you know here.

Cheers 

Champion

Hi folks & Peter,
I am already using the same & it works like a charm.

Also, I tried to access your connector from the logs you provided & from what I see is : your Account SID is still not configured on Connector.


Setup the Account SID from Twilio Console & try again.

- Assif

Thank you everyone for stepping in and helping me!  Here is the account SID that I use and its active


I type this into the demo



and then get that error



I have exact the same error as well. "Internal Error" as shown above in Peter's post.

I have the same Internal Error after following the configuration instructions in the documentation. Hoping to find a solution soon.

Hi anyone managed to have this working? I skipped the demo since it is broken and went ahead to test with my code and got the same error. Anyone knows where could be wrong here? I cracked my brain for a few days now. Verified by twilio account is valid as I'm able to send sms from another app.

Code: 20003; Message: Authenticate; Status: 401; More Info: 

Code: 20003; Message: Authenticate; Status: 401; More Info:
at ssTwilioConnector.Actions.ActionRaiseTwilioException(HeContext heContext, RCHTTPResponseRecord inParamHTTPResponse)
at ssTwilioConnector.Actions.CcTwilioCallbacks.FlowTwilioActionOnAfterResponse(HeContext heContext, STHTTPResponseStructure inParamResponse, STHTTPResponseStructure& outParamModifiedResponse)
   at ssTwilioConnector.CcTwilio.ActionMessage_SendMessage(HeContext heContext, ICcTwilioCallbacks _callbacks, String inParamAccountSid, String inParamRequestBody, STMessageStructure& outParamResponse)

POST https://api.twilio.com/2010-04-01/Accounts/AC0531e2e52c7e7b4b3c26f8895abc51a9/Messages.json HTTP/1.1
User-Agent: OutSystemsPlatform
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Authorization: [redacted]
Host: api.twilio.com
Content-Length: 45

From=siss&To=902948123StatusCallback=&Body=ss

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.