https://github.com/javierarce/figma-avatar
Update your Twitter avatar and banner from the comfort of Figma.
https://github.com/javierarce/figma-avatar
figma figma-api twitter twitter-api webhooks
Last synced: about 1 year ago
JSON representation
Update your Twitter avatar and banner from the comfort of Figma.
- Host: GitHub
- URL: https://github.com/javierarce/figma-avatar
- Owner: javierarce
- License: mit
- Created: 2021-06-02T14:19:15.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-06-03T09:21:08.000Z (about 5 years ago)
- Last Synced: 2025-02-25T20:22:44.401Z (over 1 year ago)
- Topics: figma, figma-api, twitter, twitter-api, webhooks
- Language: JavaScript
- Homepage:
- Size: 12.6 MB
- Stars: 12
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Figma Avatar
Update your Twitter avatar and banner from the comfort of Figma.

### How to use this project
1. Rename `env_sample` to `.env` and add the following information:
- Your [Figma access token](https://www.figma.com/developers/api#access-tokens) and the ID of your Figma file.
- The Twitter app credentials.
- A passcode that you'll use to protect your app.
2. Install the dependecies with `yarn install`
3. Run the server with `yarn start`
4. Create a POST webhook with the following information:
- Your `FIGMA_TOKEN` and `PASSCODE` from the first step
- Your `TEAM_ID`
- Your `APP_ENDPOINT`
- The `EVENT_TYPE` you want to use to trigger the avatar & banner change (for example: FILE_VERSION_UPDATE)
```bash
curl -X POST -H 'X-FIGMA-TOKEN: [FIGMA_TOKEN]' -H "Content-Type: application/json" 'https://api.figma.com/v2/webhooks' -d '{"event_type":" [EVENT_TYPE]","team_id":"[TEAM_ID]","endpoint":"[APP_ENDPOINT]/ping","passcode":"[PASSCODE]"}'
```
After these steps and whenever you add changes to the version history of your Figma file, your avatar and banner will get [magically] updated.
---
**Important**: this project uses the Figma [Webhooks v2 API](https://www.figma.com/developers/api#webhooks_v2) which is in beta and only available for paid teams.