Figma Setup
Create a Figma OAuth app to access design files, comments, and variables through Fp Switchboard.
Prerequisites
Section titled “Prerequisites”- Figma account with admin or editor access
- Access to Figma Developer Apps
Setup Steps
Section titled “Setup Steps”-
Create a Figma App
Go to Figma Developer Apps and click “Create a new app”.
-
Configure App Settings
- App name: Fp Switchboard
- Website URL: https://switchboard.fpdigital.ai
-
Add Redirect URI
Add the OAuth callback URL:
https://api.switchboard.fpdigital.ai/oauth/figma/callback -
Configure Scopes
Add the required scopes:
files:readfile_variables:readfile_variables:writefile_comments:write -
Copy Credentials
Copy the Client ID and Client Secret from your app settings.
Environment Variables
Section titled “Environment Variables”npx wrangler secret put FIGMA_CLIENT_IDnpx wrangler secret put FIGMA_CLIENT_SECRET| Variable | Description |
|---|---|
FIGMA_CLIENT_ID | OAuth Client ID from Figma Developer Apps |
FIGMA_CLIENT_SECRET | OAuth Client Secret from Figma Developer Apps |
Redirect URI
Section titled “Redirect URI”https://api.switchboard.fpdigital.ai/oauth/figma/callbackImportant Notes
Section titled “Important Notes”- Figma API rate limit: 720 requests per minute
- File access is scoped to the connected user’s permissions
- Design variables require the
file_variables:read/writescopes
Common Issues
Section titled “Common Issues”- “Invalid scope” error: Ensure you’ve added the exact scope names listed above. Figma scopes use underscores, not dots.
- File not accessible: The connected user must have at least viewer access to the file in Figma.
- Large file timeout: Very large Figma files may take longer to process. Switchboard handles timeouts automatically.
Testing
Section titled “Testing”- Go to your Switchboard Dashboard and navigate to Figma
- Click Connect and authorize in Figma
- Click Test Connection to verify
- Try: “List my recent Figma files” or “Get comments on [file name]”