Skip to main content
Veronichka14
New Member
March 28, 2026
Question

Plugin fetch to external API (OpenRouter) not working — no logs from code.js

  • March 28, 2026
  • 0 replies
  • 25 views

Hi everyone! I'm developing a Figma plugin that sends selected element data to OpenRouter API and receives HTML/CSS code.

The issue: The request from the plugin never reaches the API. In the plugin console (Plugins → Development → Open Console), I see no logs from code.js at all, even though ui.html sends the message (I see a "button clicked" log).

What I've done:

  • code.ts compiles to code.js

  • manifest.json includes networkAccess.allowedDomains: ["https://openrouter.ai"]

  • API key is valid (tested separately in the browser)

  • Use developer VM is enabled

What could be wrong? Why isn't Figma loading code.js or executing the fetch call? Are there any additional settings required for external API access?

Thank you! Screenshots

This topic has been closed for replies.