Search the web
Sign In
New User? Sign Up
ydn-dotnet · CLOSED: Yahoo! .NET Developer Group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
403 Forbbiden when accessing address book   Message List  
Reply | Forward Message #257 of 263 |
I am using the same page to authenticate and retrieve the data, here's
my code:

// Create an instance of Yahoo.Authentication
Authentication auth = new Authentication("myid",
"mysecret");

bool authenticate = true;

// Check if we are returning from login
if (Request.QueryString["token"] != null &&
Request.QueryString["token"].Length > 0)
{
// Make sure the call is valid
if (auth.IsValidSignedUrl(Request.Url) == true)
{
// Save the user token. It is valid for two weeks
auth.Token = Request.QueryString["token"];
auth.UpdateCredentials();
authenticate = false;

// Call web service and output result into a DIV
tag

if (auth.IsCredentialed)
{
string service =
string.Format("http://address.yahooapis.com/v1/searchContacts?
appid={0}&WSSID={1}", auth.ApplicationId, auth.WssId);


// THIS LINE IS GIVING 403 Forbidden ERROR
Div1.InnerHtml =
auth.GetAuthenticatedServiceString(new System.Uri(service));

}
else
{
authenticate = true;
}
}
}

if (authenticate)
{
// Redirect the user to the use sign-in page

Response.Redirect(auth.GetUserLogOnAddress().ToString());
}


any ideas why I am not being able to retrieve the list of contacts,
although my appID has access to the address book




Mon Feb 9, 2009 8:01 am

basilbanbouk
Offline Offline
Send Email Send Email

Forward
Message #257 of 263 |
Expand Messages Author Sort by Date

I am using the same page to authenticate and retrieve the data, here's my code: // Create an instance of Yahoo.Authentication Authentication auth = new...
basilbanbouk
Offline Send Email
Feb 9, 2009
8:01 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help