Skip to main content
Glama

Dropbox MCP Server

exchange-code.ts743 B
import * as auth from './auth.js'; import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; export async function exchangeCode(code: string, codeVerifier: string): Promise<void> { if (!code) { throw new McpError( ErrorCode.InvalidParams, 'Authorization code is required' ); } if (!codeVerifier) { throw new McpError( ErrorCode.InvalidParams, 'Code verifier is required' ); } try { await auth.exchangeCodeForTokens(code.trim(), codeVerifier); console.log('Successfully authenticated with Dropbox'); } catch (error) { console.error('Failed to exchange code:', error); throw error; } }

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/Albiemark/dbx-mcp-server'

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