Good afternoon!
I am trying to setup the Figma API with the OAuth2.0 user rather than a specific user, and I am referencing the documentation here: https://www.figma.com/developers/api#token-oauth2
Unfortunately, I am stuck at the second API call.
I am using postman to just access the API before integrating with my code, but I don’t know how to fill out the body.
I think I must be calling the API incorrectly, but this is what I have tried:
POST https://www.figma.com/api/oauth/token?
client_id=dmy client ID from the "My Apps" Page]&
client_secret=tthe original token I got when I made the new app]&
redirect_uri=https://internalsitename.com/&
code=code&
grant_type=authorization_code
{
"user_id": :My email that I use with figma],
"access_token": :HOW WOULD I KNOW THIS????],
"expires_in": :OR THIS???],
"refresh_token": :OR THIS???]
}
I have also tried without the body, since I was struggling to fill that part in, but no matter what I do, it yields the error:
{
"error": true,
"status": 400,
"message": "Parameter client_id is required",
"i18n": null
}
I suspect the “Parameter client_id is required” is not the true error since I had also seen that in the first GET call, when I messed up something unrelated to the client_id. Does anyone know how to fill in the body of this POST request?
Thank you!