AttributeError: 'Client' object has no attribute 'get_retention_policies'
RéponduHello Box Gurus,
Trying to extract retention policies. But getting an error. Is my API endpoint correct ?
sdk = JWTAuth(
client_id="myclientid",
client_secret="myclientsecret",
enterprise_id="12345",
jwt_key_id="myjwtkeyid",
rsa_private_key_file_sys_path="myprivate.pem",
)
client = Client(sdk)
retention_policies = client.get_retention_policies()
AttributeError: 'Client' object has no attribute 'get_retention_policies'
-
The Python SDK docs have examples for how to use most of the functions of the SDK — please refer to those. In general, for API endpoints that return a collection, the SDK returns an iterator that you can use in a for-in loop or manually advance by calling next() on it.
-
I did try to iterate, but it was giving me an error. After closer inspection, I found my authentication needs higher privileges.
"error_description="The request requires higher privileges than provided by the access token."'
Thanks again for the quick response. Really appreciated.
Vous devez vous connecter pour laisser un commentaire.
Commentaires
4 commentaires