I’m having trouble connecting to the Figma API using my personal access token. Every time I send a request, I get back a 403 forbidden error and I can’t figure out what’s going wrong.
I created a personal token in my Figma settings and I’m trying to fetch data from a specific file. The API documentation says I need to include the token in the headers but maybe I’m doing something wrong with the request format.
The response I keep getting is 403 Forbidden. Am I missing something in the authentication process or is there an issue with how I’m structuring the API call? Any help would be appreciated.
double-check you’re using the right file key from the url - people often grab the wrong part of the figma link. also make sure there aren’t extra spaces or characters when you copy/paste your token. i did that once and wasted hours debugging. try logging your token to confirm it’s actually there.
Had this exact problem last month - it’s usually token scoping. When you create your personal access token in Figma, the scope dropdown defaults to minimal access. You need to manually select file read permissions for what you’re doing. If you regenerated your token recently, the old one dies immediately, so double-check you’re using the newest one. Also, if the file’s in a private team workspace, some enterprise setups have extra API restrictions that’ll block external access even with correct token permissions.
try regenerating your token from scratch - they sometimes get corrupted during creation. also check if you copied extra characters when pasting the filekey from figma’s url. been there, super frustrating to debug.
That 403 error is a permissions issue, not a formatting problem. Your code looks fine, but check a few things. First, make sure your personal access token has ‘File content’ read permission enabled when you created it. Second, verify you actually have access to that specific file. Even with a valid token, you’ll get 403 if the file’s in a team or organization where your account can’t view it. I’ve hit this before when trying to access files that were shared with me but not properly permissioned. Test with a file you created yourself first - that’ll tell you if it’s a token problem or file access problem.
It seems you may be facing a token or caching issue. I’ve encountered this problem when switching between Figma accounts; I was logged into one but had generated the token from another account. Remember that the token only functions for the account that created it. Try logging out of Figma completely and signing back in with the account that generated the token. Additionally, consider if you might be hitting rate limits, as Figma can return 403 errors instead of 429 for such cases. Waiting a few minutes between test requests may help. Your request structure appears correct, so it’s likely an authentication or permission issue rather than a syntax error.