def METHOD_NAME(self, endpoint):
    url = self.root + endpoint
    while True:
        response = self.extractor.request(
            url, headers=self.headers, fatal=None, allow_redirects=False)
        if response.status_code < 300:
            return response.json()["data"]
        elif response.status_code < 400:
            raise exception.AuthenticationError("Invalid API access token")
        elif response.status_code == 429:
            self.extractor.wait(seconds=600)
        else:
            self.extractor.log.debug(response.text)
            raise exception.StopExtraction("API request failed")