Overview
Figma is sunsetting the old tokenUrl on February 26, 2025, starting at 18:00 UTC in favor of a new endpoint, so customers need to update the tokenUrl for their Figma Connections.
This article will provide instructions on how to update the tokenUrl.
Applies To
- Figma connections
Cause
Figma is sunsetting the old tokenUrl on February 24, 2025 starting at 18:00 UTC in favor of a new endpoint.
Old: https://www.figma.com/api/oauth/token
New: https://api.figma.com/v1/oauth/token
Solution
Directions to Update the tokenUrl
- Call GET Connections, or if the connection ID is known, call GET Connection by ID. The Id is available in the Admin Dashboard in the connection settings. In the response, copy the options object from the Figma connection. This will be used in the update request.
Example options object:
"options": {
...
"tokenURL": "https://www.figma.com/api/oauth/token",
...
}
- In the options object, change the tokenURL value to:
https://api.figma.com/v1/oauth/token
Example updated options object:
"options": {
...
"tokenURL": "https://api.figma.com/v1/oauth/token",
...
}
- Using the PATCH Connection by Id, the options object can be updated.
Example PATCH Request (Pass connection id in URL path and only options object)
PATCH https://{domain url}/api/v2/connections/con_Irocg2BrE5sMurE8
{
"options": {
"scope": "file_read",
"scripts": {
"fetchUserProfile": "function fetchUserProfile(accessToken, context, callback) {\n request.get({\n url: 'https://api.figma.com/v1/me',\n headers: {\n 'Authorization': 'Bearer ' + accessToken,\n }\n },\n (err, resp, body) => {\n if (err) {\n return callback(err);\n }\n\n if (resp.statusCode !== 200) {\n return callback(new Error(`[Response code: ${resp.statusCode}] ${body}`));\n }\n\n let bodyParsed;\n try {\n bodyParsed = JSON.parse(body);\n } catch (jsonError) {\n return callback(new Error(body));\n }\n\n bodyParsed.user_id = bodyParsed.id;\n bodyParsed.name = bodyParsed.handle;\n return callback(null, bodyParsed);\n });\n}"
},
"icon_url": "https://cdn.auth0.com/marketplace/catalog/content/assets/creators/figma/figma-avatar.png",
"tokenURL": "https://api.figma.com/v1/oauth/token",
"client_id": "<client_id>",
"client_secret": "<client_secret>",
"authorizationURL": "https://www.figma.com/oauth",
"integration_name": "figma"
}
}