code: public function setupToken($token)
      {
          if (!empty($token)) {
              $this->headers['Authorization'] = "Bearer $token";
              return true;
          } else {
              if ($this->throw_exceptions) {
                  throw new CanvasPest_Exception(
                      'API authorization token must be a non-zero-length string',
                      CanvasPest_Exception::INVALID_TOKEN
                  );
              }
              return false;
          }
      }
docs: Set up a new API access token to access this instance
  
  @param string $token API access token
  
  @return boolean
  
  @throws CanvasPest_Exception INVALID_TOKEN on an empty or non-string token value