Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chuanqisun/figma-development-kit
A set of tools that augment the Figma API
https://github.com/chuanqisun/figma-development-kit
figma figma-api oauth2 sdk
Last synced: 26 days ago
JSON representation
A set of tools that augment the Figma API
- Host: GitHub
- URL: https://github.com/chuanqisun/figma-development-kit
- Owner: chuanqisun
- License: mit
- Created: 2018-07-12T03:54:34.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-12T03:17:06.000Z (almost 5 years ago)
- Last Synced: 2024-04-28T01:37:35.604Z (6 months ago)
- Topics: figma, figma-api, oauth2, sdk
- Language: JavaScript
- Homepage: https://chuanqisun.github.io/figma-development-kit/
- Size: 23.4 KB
- Stars: 9
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## OAuth2
[demo](https://chuanqisun.github.io/figma-development-kit/demo/auth-demo.html) | [src](https://github.com/chuanqisun/figma-development-kit/blob/master/demo/auth-demo.html)### Quick start
Download [`callback.html`](https://raw.githubusercontent.com/chuanqisun/figma-development-kit/master/dist/callback.html) and add it to your project. Make sure you add the url of the callback file to your [Figma developer settings page](https://www.figma.com/developers/apps). Learn more by reading the [Figma OAuth2 setup guide](https://www.figma.com/developers/docs#auth-oauth).Directly use in browser
```html```
```js
const figmaApi = new fdk.FigmaApi({
clientId: '',
clientSecrete: '',
/* e.g. http://localhost:5000/callback.html or https://www.my-awesome-project.com/callback.html */
redirectUri: '',
});figmaApi.getOAuth2Token().then(token => {
console.log(token);
});
```Import as an ES6 module
```shell
npm install --save figma-development-kit
``````js
import { FigmaApi } from 'figma-development-kit';const figmaApi = new FigmaApi({
clientId: '',
clientSecrete: '',
redirectUri: '',
});figmaApi.getOAuth2Token().then(token => {
console.log(token);
});
```