MCPcopy Create free account
hub / github.com/crewAIInc/crewAI / get_integration_token

Method get_integration_token

lib/cli/src/crewai_cli/plus_api.py:34–44  ·  view source on GitHub ↗

Return the Enterprise Action Auth Token for the active organization.

(self)

Source from the content-addressed store, hash-verified

32 CLI_INTEGRATION_TOKEN_RESOURCE = "/crewai_plus/api/v1/me/integration-token" # noqa: S105 - API path, not a secret
33
34 def get_integration_token(self) -> str:
35 """Return the Enterprise Action Auth Token for the active organization."""
36 response = self._make_request(
37 "GET", self.CLI_INTEGRATION_TOKEN_RESOURCE, timeout=30
38 )
39 response.raise_for_status()
40 payload = response.json()
41 token = payload.get("api_key") if isinstance(payload, dict) else None
42 if not isinstance(token, str) or not token:
43 raise RuntimeError("AMP did not return an integration token")
44 return token
45
46 def create_evaluation(
47 self,

Calls 4

_make_requestMethod · 0.95
raise_for_statusMethod · 0.45
jsonMethod · 0.45
getMethod · 0.45