Check API access to user account
(self)
| 80 | self.access_token = token |
| 81 | |
| 82 | def check_auth(self): |
| 83 | """ |
| 84 | Check API access to user account |
| 85 | """ |
| 86 | url = self.url + "/auth/check" |
| 87 | headers = self._get_headers() |
| 88 | r = requests.get(url=url, timeout=2, headers=headers) |
| 89 | if r.status_code != 200: |
| 90 | self._log_error(url, {}, r) |
| 91 | return None |
| 92 | return r.json() |
| 93 | |
| 94 | def get_list_organizations(self): |
| 95 | """ |