How to retrieve user files and team information through Figma API after authentication

I’m working on a personal project and need to integrate with Figma’s API. After completing the OAuth authentication process, I want to fetch the authenticated user’s files, projects, and team data.

Looking through the API documentation, I found an endpoint for getting projects when you have a team ID, but I’m stuck on how to actually obtain that team ID in the first place. The OAuth flow doesn’t seem to return user details that would help me identify which teams they belong to.

Has anyone successfully implemented this kind of user data retrieval? What’s the correct approach to get a user’s associated teams and files after they’ve authorized my application?

totally get where ur coming from! after auth, just call the /v1/me endpoint. it gives you the user info and associated teams. that’s how u’ll fetch those team ids. the docs could defo be clearer on this!

Been through this exact workflow recently and hit some gotchas that aren’t documented well. After hitting /v1/me and getting your team IDs, handle pagination properly when fetching projects and files. Figma’s API has a default limit and you’ll miss data if you don’t implement cursor-based pagination correctly. Team membership status affects what you can retrieve - users might be in teams but lack access to certain projects due to workspace restrictions. I implemented a timeout mechanism because some teams have hundreds of projects and sequential API calls take forever. Draft files won’t show up unless you specifically request them through additional parameters. The permission structure is more complex than it looks, so build error handling that distinguishes between actual errors and permission-based access restrictions.

The /v1/me endpoint is correct for getting team IDs, but here’s the catch from my experience. You’ll get team data after authentication, but the API returns teams where the user has different permission levels. You won’t be able to access projects and files for all teams - depends on the user’s role. Once you have team IDs from /v1/me, iterate through them using /v1/teams/{team_id}/projects to get projects. Some calls will fail with 403 errors if the user doesn’t have enough permissions. I learned to handle these gracefully instead of treating them as real errors. For files within projects, use /v1/projects/{project_id}/files. The key insight: Figma’s permission model is pretty granular, so your app needs solid error handling for authorization failures at each level.

Yeah /v1/me is where you start, but manually managing all those API calls gets messy fast.

I’ve done similar integrations - chaining requests (auth → user → teams → projects → files) becomes a maintenance nightmare. You need error handling for each step, rate limiting, and data transformation.

Now I just build the whole flow in Latenode. Create a workflow that handles OAuth callback, hits /v1/me, loops through team IDs for projects, then grabs files. The visual setup makes debugging dead simple.

Throw in webhooks to auto-sync data instead of manually triggering everything. 20 minutes setup vs days of custom code.

Check it out: https://latenode.com