MCPcopy Create free account
hub / github.com/pollinations/pollinations / get_organization_id

Function get_organization_id

social/scripts/buffer_utils.py:89–99  ·  view source on GitHub ↗

Fetch the first organization ID for the authenticated user.

(access_token: str)

Source from the content-addressed store, hash-verified

87
88
89def get_organization_id(access_token: str) -> Optional[str]:
90 """Fetch the first organization ID for the authenticated user."""
91 result = _graphql_request(access_token, GET_ORGANIZATIONS_QUERY)
92 try:
93 orgs = result["data"]["account"]["organizations"]
94 if orgs:
95 return orgs[0]["id"]
96 except (KeyError, TypeError, IndexError):
97 pass
98 print("No organization found in Buffer account")
99 return None
100
101
102# --- Channel (profile) functions ---

Callers 1

get_buffer_channelsFunction · 0.85

Calls 1

_graphql_requestFunction · 0.85

Tested by

no test coverage detected