code: def get_token(self):
          
          
          payload = {'grant_type': 'client_credentials', 'client_id': self.client_id, 'client_secret': self.client_secret}
          r = requests.post(OAUTH_ENDPOINT, data=json.dumps(payload), headers={'content-type': 'application/json'})
  		
          response = r.json()
          
          if r.status_code != 200 and not ERROR_KEY in response:
              raise GfycatClientError('Error fetching the OAUTH URL', r.status_code)
          elif ERROR_KEY in response:
              raise GfycatClientError(response[ERROR_KEY], r.status_code)
          
          self.token_type = response['token_type']
          self.access_token = response['access_token']
          self.expires_in = response['expires_in']
          self.expires_at = time.time() + self.expires_in - 5
          self.headers = {'content-type': 'application/json','Authorization': self.token_type + ' ' + self.access_token}
docs: Gets the authorization token