Dear Massimo ,
i changed it , but now i got this :
Traceback (most recent call last):
File "C:\web2py\gluon\restricted.py", line 209, in restricted
exec ccode in environment
File "C:/web2py/applications/dropbox/controllers/default.py"
<http://127.0.0.1:8000/admin/default/edit/dropbox/controllers/default.py>,
line 82, in <module>
File "C:\web2py\gluon\globals.py", line 187, in <lambda>
self._caller = lambda f: f()
File "C:/web2py/applications/dropbox/controllers/default.py"
<http://127.0.0.1:8000/admin/default/edit/dropbox/controllers/default.py>,
line 44, in user
return dict(form=auth())
File "C:\web2py\gluon\tools.py", line 1205, in __call__
return getattr(self,args[0])()
File "C:\web2py\gluon\tools.py", line 2016, in login
cas_user = cas.get_user()
File "C:\web2py\gluon\contrib\login_methods\dropbox_account.py",
line 62, in get_user
access_token = self.sess.obtain_access_token(self.sess.token)
File "applications\dropbox\modules\dropbox\session.py", line 205, in
obtain_access_token
response = self.rest_client.POST(url, headers=headers,
params=params, raw_response=True)
File "applications\dropbox\modules\dropbox\rest.py", line 260, in POST
return cls.IMPL.POST(*n, **kw)
File "applications\dropbox\modules\dropbox\rest.py", line 207, in POST
post_params=params, headers=headers, raw_response=raw_response)
File "applications\dropbox\modules\dropbox\rest.py", line 183, in request
raise ErrorResponse(r)
ErrorResponse: [401] u'Token is disabled or invalid'
Regards,
On Tue, Oct 23, 2012 at 12:23 AM, Massimo Di Pierro <
[email protected]> wrote:
> Typo in the book:
>
> from gluon.contrib.login_methods.dr**opbox_account import use_dropbox
> use_dropbox(auth,filename='**private/dropbox.key')
> mydropbox = auth.settings.login_form
>
>
> On Monday, 22 October 2012 11:39:26 UTC-5, Hassan Alnatour wrote:
>
>> Dear Massimo ,
>>
>> i got this from the book :
>>
>> from gluon.contrib.login_methods.dr**opbox_account import use_dropbox
>> use_janrain(auth,filename='**private/dropbox.key')
>> mydropbox = auth.settings.login_form
>>
>>
>> http://web2py.com/books/**default/chapter/29/14?search=**
>> dropbox#Dropbox-API<http://web2py.com/books/default/chapter/29/14?search=dropbox#Dropbox-API>
>>
>> Best Regards,
>>
>>
>> On Mon, Oct 22, 2012 at 7:14 PM, Massimo Di Pierro <[email protected]
>> > wrote:
>>
>>> You cannot use janrain with dropbox. They are different APIs and use
>>> different keys. Look into
>>>
>>> gluon/contrib/login_methods/**dropbox_account.py
>>>
>>> for examples
>>>
>>>
>>> On Monday, 22 October 2012 08:11:13 UTC-5, Hassan Alnatour wrote:
>>>>
>>>> Dear ALL ,
>>>>
>>>> i am trying to work with dropbox API i addedthe file dropbox.key in
>>>> app/private and added the keys in it , i added the dropbox module and i am
>>>> getting this error , any help ?
>>>>
>>>>
>>>> regards,
>>>>
>>>>
>>>> Traceback (most recent call last):
>>>>
>>>> File "C:\web2py\gluon\restricted.**py**", line 209, in restricted
>>>>
>>>> exec ccode in environment
>>>> File "C:/web2py/applications/**dropbo**x/models/db.py"
>>>> <http://127.0.0.1:8000/admin/default/edit/dropbox/models/db.py>, line 67,
>>>> in <module>
>>>>
>>>> use_janrain(auth,filename='**pri**vate/dropbox.key')
>>>>
>>>> File "C:\web2py\gluon\contrib\**login**_methods\rpx_account.py", line
>>>> 121, in use_janrain
>>>>
>>>> domain,key = open(path,'r').read().strip().****split(':')
>>>> ValueError: too many values to unpack
>>>>
>>>> --
>>>
>>>
>>>
>>>
>>
>> --
>
>
>
>
--