Skip to main content
Glama

Analytics MCP

by Ninoambaraa
paypal.ts861 B
import { config } from "../config"; export async function getPaypalAccessToken(): Promise<string | null> { const credentials = Buffer.from( `${config.paypal.client_id}:${config.paypal.client_secret}` ).toString("base64"); const response = await fetch(`${config.paypal.base_url}/v1/oauth2/token`, { method: "POST", headers: { Authorization: `Basic ${credentials}`, "Content-Type": "application/x-www-form-urlencoded", }, body: "grant_type=client_credentials", }); if (!response.ok) { const text = await response.text(); throw new Error( `Failed to fetch PayPal access token: ${response.status} ${text}` ); } const data = await response.json(); const accessToken = data.access_token; if (typeof accessToken !== "string" || !accessToken.length) { return null; } return accessToken; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Ninoambaraa/superalink-mcp-analytics'

If you have feedback or need assistance with the MCP directory API, please join our Discord server