Dear Alain,

Can I use ClientLogin Authorisation mechanism to access gmail (unread) 
feeds. 

I am getting the ClientLogin Auth token successfully as follows:
                     google_auth_token := gaauth(username, password, 
'mail'); //here 'mail' is one specific google service scope

However, when sending a request to the below url :
                     google_api_url VARCHAR2(100) := 
'https://mail.google.com/mail/feed/atom';

And attaching appropriate headers as below :
                     req := utl_http.begin_request(url=>google_api_url, 
method=>'GET');
                    utl_http.set_header(r=>req, name=>'Content-Type', 
value=>'application/atom+xml');
                   utl_http.set_header(req, 'Authorization', 'GoogleLogin 
auth=' || google_auth_token);   
                    l_resp := utl_http.get_response(r=>req);
                   dbms_output.put_line(l_resp.status_code);

I get the error as follows :                   
                   HTTP client error 401 - Unauthorized

Now, When I try to replicate the same to access google calendar service as 
below I get the response successfully.
                  google_auth_token := gaauth(username, password, 'cl'); 
//here 'cl' is one specific google service scope
                  google_api_url VARCHAR2(100) := 
'https://www.google.com/calendar/feeds/default/private/full';

The Calendar procedure works perfectly fine, I don't understand what is 
going wrong with the gmail procedure. Any help would be greatly appreciated.

Thanks,
Prateek

Alain wrote:
> Hello Prateek,
> 
> What are the data that you send to the ClientLogin URL? What service and 
> scope do you use?
> Also, I would suggest using 
> "https://www.google.com/calendar/feeds/default/private/full"; instead of 
the 
> non-SSL feed.
> 
> Best,
> Alain

-- 
You received this message because you are subscribed to the Google
Groups "Google Calendar Data API" 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://code.google.com/apis/calendar/community/forum.html

Reply via email to