javierarce / figma-avatar

Update your Twitter avatar and banner from the comfort of Figma.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 and the ID of your Figma file.
  • The Twitter app credentials.
  • A passcode that you'll use to protect your app.
  1. Install the dependecies with yarn install
  2. Run the server with yarn start
  3. 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)

    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 which is in beta and only available for paid teams.

About

Update your Twitter avatar and banner from the comfort of Figma.

License:MIT License


Languages

Language:JavaScript 100.0%