When did you get the error, which statement caused this error?
From: farid_974 <farid_974@...>
To: ydn-dotnet@yahoogroups.com
Sent: Wednesday, August 6, 2008 3:18:46 PM
Subject: [ydn-dotnet] 403 Error when retrieving Contact Book
Hi everyone,
I'm trying to retrieve all email address for the contact book in order
to invite people on my website.
I'm using ASP.NET 2.0, the .NET framework 2.0 and C#
When i'm trying to retrieve the XML, i got an error 403...
Actually i'm just using these code:
Authentication auth = Session["Auth" ] as Authentication;
if (Request.QueryStrin g["token" ] != null &&
Request.QueryString ["token"] .Length > 0)
{
if (auth.IsValidSigned Url(Request. Url) == true)
{
auth.Token = Request.QueryString ["token"] ;
auth.UpdateCredenti als();
Response.Write( "ok");
}
else
{
Response.Write( "error");
}
}
if (auth.IsCredentiale d == true)
{
string url =
"http://address. yahooapis. com/v1/searchCon tacts?format= xml&fields= name,email";
url += "&appid=" + auth.ApplicationId;
url += "&wssid=" + auth.WssId;
Uri address = new Uri(url);
XmlDocument doc =
auth.GetAuthenticat edServiceXmlDocu ment(address) ;
}
else
{
Response.Write( "Not authenticated" );
}
Please, help me to do this because i don't know why i don't have acces.