Skip to main content

I am creating a client to consume json from figma API. Was going through documentation, and couple of questions I have -




  1. Is there a Java SDK for Figma API? Writing client and type is time consuming.




  2. I was going through Figma APIs and it seems that after we fetch user details, there is no way to programmatically fetch the teamIds based on userId. To get projects, the teamId has to be supplied manually. In my flow, once a user provides authentication using oAuth2, I am able to fetch user details, but in addition to oAuth, the user has to provide the teamId too. It might be difficult for normal users to be able to find the teamId from their figma urls. Please let me know if I am missing something from the documentation.




  3. It is not clear what is the data type of Path, specified inside VECTOR NodeType, specifically for fields such as strokeGeometry, or fillGeometry. I am assuming it is an array of String, representing SVG Paths. Is my assumption correct?




  4. Can there be Nodes which are of type just Vector? I mean is VectorNode an abstract node?




  5. Docs about StyleMap seemed a bit confusing. Doc specifies that it is a type of <StyleType, String>, and StyleType enum has only 4 values. But in response, I am seeing this for one of the Rectangles -

    “style”:{

    “fontFamily”: “Roboto”,

    “fontPostScriptName”: null,

    “fontWeight”: 400,

    “fontSize”: 14,

    “textAlignHorizontal”: “LEFT”,

    “textAlignVertical”: “TOP”,

    “letterSpacing”: 0,

    “lineHeightPx”: 16.40625,

    “lineHeightPercent”: 100,

    “lineHeightUnit”: “INTRINSIC_%”

    }




  6. As others have asked in other posts, are there plans to send final css, andoid and iOS code in API response? Is this is missing just in Rest APIs and is available via plugins built inside Figma?




  7. What is the center of origin to all x and y values in absoluteBoundingBox of all nodes inside a Frame? Is there a chance they are relative to parents, or are they all absolute to a single point of reference, within a Frame?




Thanks


  1. This is what I found searching for “figma api java”: GitHub - quicktype/figma-types: Typed client code for Figma Platform

  2. You are right, file keys or team IDs have to be entered manually by the user. They can paste a team link or file link somewhere and you can extract the key/id from there.

  3. The best way to find out is to check it yourself. Or maybe someone on the Figma team would be able to clarify.

  4. I don’t fully understand the question. VECTOR node type is different from the Vector type which represents simply X and Y coordinates.

  5. I don’t know.

  6. This is not available anywhere.

  7. Absolute BB is absolute to the center of the Figma workspace. There is no relativity there as far as I know. But I haven’t checked, so you can test this empirically.


Hi Glen,

Thanks for the quick response.




  1. That does not look like official repo. Also last commits are 3 years old. Wanted to know if there are any official sdks.




  2. By VectorNode, I mean that since Rectangle node and Eclipse node inherits properties from VectorNode. So, can there be a node which is just VectorNode. Not referring to Vector (which contains just x and y)




Thanks again.



  1. No, there is nothing like that.

  2. Yes, such nodes represent regular plain vector nodes.


Okay, thanks for the info.



If this is true, how was Uber (at the last config event) able to scan every file that uses their design system to track component usage?



This is probably how. Collect all team ids manually, from there get all file ids and scan them.


Any solution for this?


Reply