I am new to api's and I was wondering if any one had some example code which create's authentication strings similar to Myspace's API Tool (Request Format:By URI).
I need to be able to create my own authentication strings rather than relying on the API Tool.
Any help would be appreciated : )
Thanks guys,
Ian.
I have listed my code below:
I am using HttpWebRequest's to send a request and then reading the data retrieved.
string str1="http://api.msappspace.com/v1/users/39553482/profile.xml?oauth_consumer_key=4234F2B2-B4E3-420a-9839-7966192982A1&oauth_nonce=62422021702774888&oauth_signature=0K424l0rteTJ5HhvdFICrC4wVc%3D&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1203105370&oauth_token=&oauth_version=1.0";
HttpWebRequest request = WebRequest.Create(str1) as HttpWebRequest;
// Add authentication to request
request.Credentials = new NetworkCredential("user", "password");
// Get response
using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)
{
// Get the response stream
XmlTextReader reader = new XmlTextReader(response.GetResponseStream());