Oauth

212 views
Skip to first unread message

Twiliozer

unread,
Apr 27, 2011, 11:20:40 PM4/27/11
to stash...@googlegroups.com
First off - sorry, but this is .NET

Do you have anyone using this with .NET?  We don't care about the language, we just need something that'll work.  We are a Twilio customer and thought this would be as easy to integrate.  No luck.

We are using oauthbase.net, here's the code:

Dim data As String = ""
Dim client As WebClient
Dim postbytes As Byte()
Dim responsebytes As Byte()
Dim response As String
Dim ConsumerKey As String = "anonymous"
Dim ConsumerSecret As String = "anonymous"
Dim OAuthToken As String = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
Dim OAuthTokenSecret As String = "YYYYYYYYYYYYYYYYYYY"
Dim u As String
Dim p As String
Dim oab As New oauth.OAuthBase
Dim nonce As String = oab.GenerateNonce
Dim ts As String = oab.GenerateTimeStamp
Dim sig As String = oab.GenerateSignature(uri, "", "", OAuthToken, OAuthTokenSecret, "POST", ts, nonce, u, p)

client = New WebClient()
sig = oab.UrlEncode(sig)
p = "oauth_signature=" & sig & "&" & p
postbytes = Encoding.ASCII.GetBytes(p)
client.Headers.Add("Content-Type", "application/x-www-form-urlencoded")
responsebytes = client.UploadData(u, "POST", postbytes)
response = Encoding.ASCII.GetString(responsebytes)

When we view our credentials from the dashboard (~/documentation/credentials) we still see "anonymous" as the consumer key - which appears to be strange from the documentation, so whenever we submit a POST we die with a 403 on the red line.

TIA

Manish Jain

unread,
Jun 14, 2013, 8:07:22 AM6/14/13
to stash...@googlegroups.com
Hi Tia,

Did you get it working?

Thanks,
Manish
Reply all
Reply to author
Forward
0 new messages