Hi!
I am currently developing an application that interacts with Figma files (updating some nodes) through the Figma API. I am encountering persistent issues.
Details of the Issue:
-
Node Information:
- ID: “yy:yyy”
- Type: TEXT
- Current Name “xxxxxxxxxxxx”
-
API Request:
- Endpoint: PUT [https://api.figma.com/v1/files/{file_key}]
-
Payload:
json
{
“document”: {
“id”: “yy:yyy”,
“name”: “xxxxxxxxxxxx”
}
} -
Headers:
- X-FIGMA-TOKEN: [Valid API Token]
-
Error Response:
- Status Code: 404 Not Found
- Message: { status: 404, err: ‘Not found’ }
-
Additional Information:
- Figma Account Plan: Professional
- API Token Permissions: File content (read), Comments (write), Dev resources (write), Webhooks (write)
- Development Environment: Node.js application using Axios for HTTP requests
Request for Assistance:
I am seeking your expertise to understand the following:
- Feasibility: Is it possible to update the name property of a text node using the Figma API? If not, which properties are modifiable?
- Correct Endpoint and Method: Am I using the appropriate API endpoint and HTTP method for this operation? If there is a more suitable approach, please advise.
- Error Clarification: What does the 404 error indicate in this context? Does it pertain to the node not being found, or is it related to insufficient permissions?
- Best Practices: Could you provide guidance or best practices for programmatically updating node properties within a Figma file?
- Token permissions: why my token “file content” permission is just “read”, no possibility to select “write” permission when I generate a new token despite I have Professional Plan?
Additional Information:
- Figma Account Plan: Professional
- API Token Permissions: File content (read), Comments (write), Dev resources (write), Webhooks (write)
- Development Environment: Node.js application using Axios for HTTP requests
Thanks