Figma Support Forum

"404 Not found" error when accessing text styles via Rest API

I have a Figma file where all the text styles stored. These text styles are published. When I try to access this text styles via Figma API (GET/v1/files/:file_key/styles) I get “404 Not found” error. If I change share permission from “Only people invited to this file” to “Anyone with the link” everything works as expected but I can’t leave share permission as “Anyone with the link” due to security reasons.

Is it possible to get file styles when share permission is “Only people invited to this file”?

Whose access token are you using? If that’s your personal access token and you have access to this file, it should work.

1 Like

Thank you very much, Gleb! I use two Figma accounts and generated token for wrong account. I’ve generated token for another account and now everything works as expected. You saved my day!

1 Like