Getting up on Twilio

Das Goravani goravanis at gmail.com
Mon Mar 6 17:42:36 UTC 2023


Do iHeadersList.$define(iHeaderName,iHeaderValue)
Do iHeadersList.$add(con('-u ',iUserName),iPassword)

I used the above to insert my user name and password header into an HTTP POST command.

At least I got a response from their server. So I am now hitting the server.

The response I got said "No credentials provided", as if it missed my header list completely.

So the above is not working for inserting the credentials header. 

Phillip thought I should just put in that -u in front of my SID. I did that, didn’t work. I thought that would work too, but no. 

Any ideas? 

The error text said a bunch of code, meaningless, then the error "No credentials provided".  



> On Mar 6, 2023, at 12:13 PM, <philip.tulett at pdq-networks.com> <philip.tulett at pdq-networks.com> wrote:
> 
> Hi Das, 
> 
> I should add that iHeaderName and iHeadervalue are both character variables, and obviously iHeaderList is a list variable.
> 
> Kind regards
> Phil
> -----Original Message-----
> From: omnisdev-en <omnisdev-en-bounces at lists.omnis-dev.com> On Behalf Of philip.tulett at pdq-networks.com
> Sent: Monday, March 6, 2023 5:11 PM
> To: 'OmnisDev List - English' <omnisdev-en at lists.omnis-dev.com>
> Subject: RE: Getting up on Twilio
> 
> Hi Das,
> 
> I use the following code to create the header list...
> Do iHeadersList.$define(iHeaderName,iHeaderValue)
> Do iHeadersList.$add("content-type","application/json")
> 
> In your case, the iHeadersList.$add would be something like:- Do iHeadersList.$add("-u your_account_sid"," your_auth_token")
> 
> 
> Kind regards
> Phil
> 
> -----Original Message-----
> From: omnisdev-en <omnisdev-en-bounces at lists.omnis-dev.com> On Behalf Of Das Goravani
> Sent: Monday, March 6, 2023 5:01 PM
> To: OmnisDev List - English <omnisdev-en at lists.omnis-dev.com>
> Subject: Re: Getting up on Twilio
> 
> 
> HdrList is an optional parameter. It is an Omnis list with two character columns.. The list contains additional headers to add to the headers of the HTTP POST request. Note that the header name excludes the ‘:’, which HTTPPost inserts automatically when it formats the header.
> 
> How can I use the above to insert this:
> 
> -u your_account_sid:your_auth_token
> 
> I have the account SID string and token string. I just don’t know how to put this data into the HTTP Post command. 
> 
> I think that the header list described from Omnis manual above will insert my account SID and token with the : in-between them, I just don’t know how to get the -u in front of it. 
> 
> 
> _____________________________________________________________
> Manage your list subscriptions at https://lists.omnis-dev.com Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 
> 
> _____________________________________________________________
> Manage your list subscriptions at https://lists.omnis-dev.com Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 
> 
> _____________________________________________________________
> Manage your list subscriptions at https://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 



More information about the omnisdev-en mailing list