1.0.16 • Published 6 years ago

figma-development-kit v1.0.16

Weekly downloads
5
License
MIT
Repository
github
Last release
6 years ago

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 figmaApi = 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>', 
});

figmaApi.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 figmaApi = new FigmaApi({
  clientId: '<FIGMA_CLIENT_ID>',
  clientSecrete: '<FIGMA_CLIENT_SECRETE>',
  redirectUri: '<PATH_TO_CALLBACK_FILE>',
});

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

6 years ago

1.0.15

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.8

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago