Thanks, Frank, but I was hoping for something more specific. I
searched all the samples sources in the .net API kit. I found a couple
of usage instances among the unit test sources, but that's not great
as a comprehensive example. Looking at the .net api sources I managed
to figure out one approach that looked like it should work. Here's the
relevant code snipped:
CalendarService service = new CalendarService("exampleCo-
exampleApp-1");
service.setUserCredentials(userLogin, userPassword);
GDataGAuthRequestFactory authHelper = new
GDataGAuthRequestFactory("cl","BinaryTree-Cal-Upload");
service.RequestFactory = authHelper;
string token = authHelper.QueryAuthToken(new
GDataCredentials(userLogin, userPassword));
In tracing into the code on this last statement, it seems to be doing
all the right things. The default account type is GOOGLE_OR_HOSTED,
which is what I wanted. The code is using an ASCII encoder, which I
find a bit strange (why not utf? What if I have DBCS content?), but
ok, whatever.
The account I'm targeting is a hosted company site, I even coded the
"@" as "%40" to be nice. The request is sent and the response received
without throwing. I look at the HttpWebResponse that's returned, and
the status is "OK". However, on this line:
TokenCollection tokens =
Utilities.ParseStreamInTokenCollection(response.GetResponseStream());
Sometimes it works fine, and I get the token, other times it throws an
Exception saying, "Stream is not readable".
So, my real question is, am I doing something wrong? And, if not, what
do I do to recover from the Exception?
TIA
On Mar 27, 7:14 am, Frank Mantek <[EMAIL PROTECTED]> wrote:
> sure there is. Go to:
>
> http://code.google.com/p/google-gdata
>
> Frank Mantek
> Google
> On Mar 27, 2008, at 9:36 AM, bobb wrote:
>
>
>
> > I've spent hours searching, can't find one. If it does exist, is there
> > a sample showing how to use it?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Apps APIs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/google-apps-apis?hl=en
-~----------~----~----~----~------~----~------~--~---