Figma Component Not found issue

Issue: I am working on a project that fetches components from Figma using Flask and the Figma API. However, when I try to retrieve the components, I get an empty list or "Component not found" response, even though I have created components in Figma. Additional Information: My components are located under the "Drafts" section in Figma. I’ve checked the access token and it’s valid. I can see the Figma file and components when I open the file in Figma, but they are not being retrieved by the API. Question: How can I ensure that the components in my Figma file are properly retrieved via the Figma API? Are there any specific settings or permissions I need to adjust?

I tried this method Postman Setup: Method: POST URL: http://127.0.0.1:5000/generate Headers: Content-Type: application/json Body (raw JSON): { "component_name": "Primary Button" } Error/Response: I receive a successful API status response with status: 200, but the components array is always empty: { "error": false, "status": 200, "meta": { "components": [] } }

Upvotes: 0

Views: 70

Answers (1)

Nouf Alblowi
Nouf Alblowi

Reputation: 3

Since your components are in the drafts, make sure the access token you're using has permission to access files in that section.

Upvotes: 0

Related Questions