Closed pradeepvairamani closed 10 years ago
Works for me:
>>> client.share_link(12345678, access=ShareAccess.COLLABORATORS)
{u'unshared_at': None, u'url': u'<url>', u'download_url': u'<url>, u'access': u'collaborators', u'preview_count': 0, u'is_password_enabled': False, u'download_count': 0, u'vanity_url': None, u'permissions': {u'can_preview': True, u'can_download': True}}
oops, didn't mean to close.
Can you paste a code example?
scratch that - see the documentation:
can_download Whether this link allows downloads. Can only be used with Open and Company
can_preview Whether this link allows previewing. Can only be used with Open and Company
I'm adding this to the docstring
Thank you. Getting rid of can_download and can_preview fixed the issue.
The share_link() method is working when access=ShareAccess.OPEN. However when access=ShareAccess. COLLABORATORS, it is giving status 400
{"type":"error","status":400,"code":"bad_request","context_info":{"errors":[{"reason":"invalid_parameter","name":"shared_link_permissions","message":"Invalid value \'download => 1\'."}]}