0

C# Unknown error when calling UpdateCredentials()

I'm trying to make a desktop app with C#. I have the following but when I call auth.UpdateCredentials() it fails with "Unknown error". I changed the numbers of the id, secret, and token. These are not the real values. I guess the reason I'm showing some values here is because in the source code it says token, but when I got my information it was called API Key. Just wanted to make sure they were the same thing.

CODE
// Enter your application ID here.
String appid = "MWMIti5c";

// Enter your shared secret here.
String secret = "bew4c13cd1c88ae3e0h4153524d1ce90h0d332bw";

// Enter the user token here.
String token = "yj0yJmk1YWFuRWVTdzFKUzVWJmQ9WVdrOVRWZEWTWFJwTldNbWNYbzlNAFl3TlRjek5UZy0tJnM9
Y29uc3VtZZWNyZXQmeD1jMA--";

// Get the auth credentials. Create the Yahoo.Authentication object with the
// application ID and secret from the BBAuth signup process.
Yahoo.Authentication auth = new Yahoo.Authentication(appid, secret);

// Set the user token.
auth.Token = token;

// Update the credentials. This will fetch a new WSSID and a "Y" cookie for
// the user.
try
{
auth.UpdateCredentials();
}
catch (Exception e)
{
}

by
2 Replies
  • Are you trying to develop an app using Yahoo Mail API's? If yes then are you using OAuth for authentication/ authorization?
    If you want to know more on how to use the api's check out the examples and also there are client libraries in the same page which you can use. For any questions on OAuth please post it on OAuth forums to get better answers. Thanks

    --R


    QUOTE (ricky.piller @ May 25 2010, 05:18 PM) <{POST_SNAPBACK}>
    I'm trying to make a desktop app with C#. I have the following but when I call auth.UpdateCredentials() it fails with "Unknown error". I changed the numbers of the id, secret, and token. These are not the real values. I guess the reason I'm showing some values here is because in the source code it says token, but when I got my information it was called API Key. Just wanted to make sure they were the same thing.

    CODE
    // Enter your application ID here.
    String appid = "MWMIti5c";

    // Enter your shared secret here.
    String secret = "bew4c13cd1c88ae3e0h4153524d1ce90h0d332bw";

    // Enter the user token here.
    String token = "yj0yJmk1YWFuRWVTdzFKUzVWJmQ9WVdrOVRWZEWTWFJwTldNbWNYbzlNAFl3TlRjek5UZy0tJnM9
    Y29uc3VtZZWNyZXQmeD1jMA--";

    // Get the auth credentials. Create the Yahoo.Authentication object with the
    // application ID and secret from the BBAuth signup process.
    Yahoo.Authentication auth = new Yahoo.Authentication(appid, secret);

    // Set the user token.
    auth.Token = token;

    // Update the credentials. This will fetch a new WSSID and a "Y" cookie for
    // the user.
    try
    {
    auth.UpdateCredentials();
    }
    catch (Exception e)
    {
    }
    0
  • Sorry, I guess I thought OAuth was part of the mail api with authentication to get to the mail box.
    0

Recent Posts

in Yahoo! Mail Web Services API