On 07/29/2013 04:08 PM, Patrick Ohly wrote:
> On Mon, 2013-07-29 at 14:39 +0200, Patrick Ohly wrote:
>> On Mon, 2013-07-29 at 09:39 +0000, Valluri, Amarnath wrote:
>>>> When using my own client ID/secret for an app for which I have enabled
>>>> the CalDAV API, I get an error about the scope "email"
hard-coded in the
>>>> example. Not surprising. So, which Google API do I need to enable for
>>>> the example? I looked for "GMail" or "mail", but
that is not currently
>>>> offered to me.
>>> [Amarnath] A wild guess : Scope is 'calendar' in this case.
>> I had an error in my command line (wrong combination of client
>> ID/secret). After fixing that, I was able to get a token for "email".
>> After recompiling with "calendar", it fails immediately without
popping
>> up a dialog:
>>
>> ** (lt-google-oauth2-example:19038): WARNING **: get_google_token_cb:
>> GDBus.Error:com.google.code.AccountsSSO.gSingleSignOn.Error.NotAutherized:
Authorization server returned an error: invalid_request
>>
>> Is that because "calendar" is invalid or because there is some cached
>> state somewhere?
> This example here uses "https://www.googleapis.com/auth/calendar":
>
>
https://developers.google.com/google-apps/calendar/instantiate
>
> However, I still get the same "invalid_request" error.
>
> Note that this page here says that "scope" must be "openid
email" or
> "openid profile":
>
https://developers.google.com/accounts/docs/OAuth2Login
>
> I've tried:
> g_hash_table_insert (params, "Scope", g_variant_new_string
("email
https://www.googleapis.com/auth/calendar"));
>
> Didn't help either. Is it correct to enter different scope strings as
> space-separated words?
>
> Anyway, I'm stuck on this one, some help would be appreciated.
>
Your are almost there, the right scope to use is :
"https://www.googleapis.com/auth/calendar"
g_hash_table_insert (params, "Scope", g_variant_new_string
("https://www.googleapis.com/auth/calendar"));
Already tried that when I saw the example that I mentioned above,
doesn't work here.
Does it work for you?
--
Best Regards, Patrick Ohly
The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.