Odoo Help


Token invalid with google calendar sync ?

on 1/21/15, 10:29 AM 3,487 views

Dear all,

I'm running Odoo on a virtual private ubuntu server and it works great.

I'm trying to synchronize my Odoo calendar with my Google Apps calendar.

I've went to the google api, got my secret code and ID and set this :

URI redirection :

URi javascript :

And yet I have the following message when I click on "Sync with Google":

Traceback (most recent call last): File "/opt/odoo/openerp/http.py", line 500, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/opt/odoo/openerp/http.py", line 517, in dispatch result = self._call_function(**self.params) File "/opt/odoo/openerp/http.py", line 283, in _call_function return checked_call(self.db, *args, **kwargs) File "/opt/odoo/openerp/service/model.py", line 113, in wrapper return f(dbname, *args, **kwargs) File "/opt/odoo/openerp/http.py", line 280, in checked_call return self.endpoint(*a, **kw) File "/opt/odoo/openerp/http.py", line 733, in __call__ return self.method(*args, **kw) File "/opt/odoo/openerp/http.py", line 376, in response_wrap response = f(*args, **kw) File "/opt/odoo/addons/google_calendar/controllers/main.py", line 43, in sync_data return gc_obj.synchronize_events(request.cr, request.uid, [], context=kw.get('local_context')) File "/opt/odoo/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo/addons/google_calendar/google_calendar.py", line 535, in synchronize_events st, current_google, ask_time = self.get_calendar_primary_id(cr, uid, context=context) File "/opt/odoo/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo/addons/google_calendar/google_calendar.py", line 284, in get_calendar_primary_id if (e.code == 401): # Token invalid / Acces unauthorized AttributeError: 'Warning' object has no attribute 'code'



Hello, Can you check that you have no trailing whitespace in your google_id and google_secret_key...

Jérémy Kersten (jke)
on 1/27/15, 6:37 AM

It's seems that your token are invalid, if you are in this function, your google api seems to be ok (or was ok at one moment)... but now something seems broken. Can you try with another user to be sure that the error is just for your user... Best regards JKE

Jérémy Kersten (jke)
on 1/27/15, 6:42 AM

Hello, i've checked : no whitespace, and it doesn't work with any user...

on 1/28/15, 8:58 AM
On 4/21/15, 12:11 AM

Hello All,

Hope this help you


For more information contact@tidyway.in

Thanks, Rohan Nayani

On 1/27/15, 6:30 AM

Dear Naoli,

URL  REDIRECT URIS :  http://localhost:8069/google_account/authentication

If You Run on mywebsite.odoo.com then you can put only below Redirect URL


Javascript Url is None 

Then Run your pogram

May be Successfully Run 

I hope You understand my ans.


Hello, I'm not on odoo.com but on my own VPS. Anyway it does not work with javascript url either. Any other idea ?

on 1/28/15, 8:57 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 1/21/15, 10:29 AM
Seen: 3487 times
Last updated: 4/21/15, 12:11 AM