New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

figma-development-kit

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

figma-development-kit

A set of tools that augment the Figma API


Version published
Weekly downloads
18
increased by28.57%
Maintainers
1
Weekly downloads
 
Created

OAuth2

demo | src

Quick start

Download callback.html and add it to your project. Make sure you add the url of the callback file to your Figma developer settings page. Learn more by reading the Figma OAuth2 setup guide.

Directly use in browser

<script src="https://unpkg.com/figma-development-kit@^1/dist/fdk.umd.js"></script>
const fiamgaApi = new fdk.FigmaApi({
  clientId: '<FIGMA_CLIENT_ID>',
  clientSecrete: '<FIGMA_CLIENT_SECRETE>',
  /* e.g. http://localhost:5000/callback.html or https://www.my-awesome-project.com/callback.html */
  redirectUri: '<PATH_TO_CALLBACK_FILE>', 
});

fiamgaApi.getOAuth2Token().then(token => {
  console.log(token);
});

Import as an ES6 module

/* in source code */
npm install --save figma-development-kit
import { FigmaApi } from 'figma-development-kit';

const fiamgaApi = new FigmaApi({
  clientId: '<FIGMA_CLIENT_ID>',
  clientSecrete: '<FIGMA_CLIENT_SECRETE>',
  redirectUri: '<PATH_TO_CALLBACK_FILE>',
});

fiamgaApi.getOAuth2Token().then(token => {
  console.log(token);
});

Keywords

FAQs

Package last updated on 12 Jul 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts