figma-to-flutter icon indicating copy to clipboard operation
figma-to-flutter copied to clipboard

How to find authentication token and file_key

Open marcmacias96 opened this issue 6 years ago • 7 comments

what should be entered in file_key? image

marcmacias96 avatar Feb 21 '19 15:02 marcmacias96

Hi ! As stated in the Figma API documentation :

  1. Login to your Figma account.
  2. Head to the Account Settings from the top-left menu inside Figma.
  3. Find the Personal Access Tokens section.
  4. Click Create new token.
  5. A token will be generated. This will be your only chance to copy the token, so make sure you keep a copy of this in a secure place.

aloisdeniel avatar Feb 21 '19 16:02 aloisdeniel

Hi, I got the token but how do I get the file_key? The documentation to get the file_key is poor.

osjunior avatar Mar 29 '19 13:03 osjunior

You still can not use because on the page only generates the token and still do not understand what is the file_key

marcmacias96 avatar Mar 31 '19 21:03 marcmacias96

"To get your file key, simply extract it from url."

If you get the web link to your figma file, it should look something like: https://www.figma.com/file/XXXXXXXXXXXXX/Sample-File

Where those XXXXX's are, is the file key :)

ogarvey avatar Apr 04 '19 16:04 ogarvey

I have authentication token and file key. I entered into the fields and click on the button. Nothing happens 2019-08-06_16-10-06

MKoposov avatar Aug 06 '19 13:08 MKoposov

I have authentication token and file key. I entered into the fields and click on the button. Nothing happens 2019-08-06_16-10-06

Look the console for check the error.

TxusBlack avatar Aug 12 '19 23:08 TxusBlack

I am seeing a CORS error:

Access to XMLHttpRequest at 'https://api.figma.com/v1/files/xxxxxxxxxxxxxxxxxx?geometry=paths'
from origin 'https://aloisdeniel.github.io' has been blocked by 
CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Any idea how to fix this?

ajaygautam avatar Nov 08 '20 16:11 ajaygautam