Skip to main content
petrvostry
New Member
February 10, 2025
Question

Unable to Export Local Variables - API Endpoint Returns "Request Too Large" Error

  • February 10, 2025
  • 13 replies
  • 1024 views

I'm encountering an issue with the Variables API endpoint when attempting to export local variables. The endpoint returns all remote variables from shared files, making it impossible to export only local variables.

Current Behavior:

  • The endpoint returns all remote variables from shared files
  • Unable to filter or export only local variables
  • Receiving a 400 error with "Request too large" message

Error Response:

{ "status": 400, "error": true, "message": "Request too large. If applicable, filter by query params." }

Technical Details:

  • The error message suggests using query parameters for filtering
  • However, the endpoint documentation doesn't list any available query parameters
  • The endpoint lacks pagination capabilities
  • This limitation makes the endpoint essentially unusable for files with many variables

Expected Behavior:

  • Ability to export only local variables
  • Support for filtering variables (local vs. remote)
  • Pagination support for large variable sets

Impact: This issue significantly impacts workflow automation and variable management, especially in projects with multiple shared libraries and variable collections.

Suggested Solutions:

  1. Add query parameters for filtering variable types (local/remote)
  2. Implement pagination support
  3. Add ability to specify variable scope in the request

Let me know if you'd like me to modify any part of this bug report.

This topic has been closed for replies.

13 replies

Celine_
Figmate
Community Support
July 18, 2025

Hi ​@Jan Konopásek , ​@Annelies_Groeneveld , thanks for sharing these details!

We’ve passed this along to our internal team, and our engineering team would like to take a closer look at your cases. I’ve gone ahead and created support tickets on your behalf:

  • Jan: #1436547

  • Annelies: #1436551

Feel free to reply directly to your ticket. When you do, please include the link to the affected file showing the “request too large” error, and grant edit access to support-share@figma.com (this won’t affect your billing).

You should have received an email (via your Figma email account). Thanks again for your patience and please check your inbox when you have a moment!

Update: For visibility here, about these two cases, our engineering team has made further changes to address the gateway timeout, and their issues has been solved now.
For others, who may encounter a similar issue, and the issue still persists, I’d recommend reaching out directly to our support team here so they can double check the root cause of the issue on your end, and investigate it faster. Thank you!

Emily Plummer
New Member
September 17, 2025

Hello! 

 

I’m the design systems lead for WPP here at Stripe - running into the same issue. We manage our tokens in code via the Figma API for variables and it’s been working totally fine for us up until this morning. We’re now getting a Error: socket hang up response back when trying to fetch our variables. I’m assuming that it’s because the file has gotten too large because when I try with an empty test file it works fine. This is a huge blocker for us using Figma for our design system, for some of the reasons mentioned above it’s not feasible for us to split our variables into multiple files. Would love to know if there’s any way to work around this or any expected updates to the API.

Celine_
Figmate
Community Support
September 23, 2025

Hi ​@Emily Plummer , sorry to hear you’re running into the same issue! Since you’re seeing the specific error “socket hang up,” it’s best for our Technical Quality team to take a deeper look to find the root cause of it.

I can see on our side that you’ve already contacted the support team (thank you!). They’re waiting for your reply to continue the investigation, so please check your inbox when you have a moment. 🙏🏼