Search code examples
facebookfacebook-graph-apiaccount-kit

Account Kit Graph API Bad Request


I am using the following graph api endpoint to seek the access token at the server side of my app for the given authorization code.

https://graph.accountkit.com/v1.1/access_token?grant_type=authorization_code&code=authorization_code&access_token=AA|facebook_app_id|app_secret

As mentioned in the Account kit docs for the access_token parameter I have concatenated the following:

"AA" + app id + app secret

Still I am getting Bad Request as response and following error is received:

"message": "Invalid OAuth access token.", "type": "OAuthException", "code": 190,


Solution

  • The error was that I was using my app_secret, there is a separate secret for account kit, that you can find in your Account Kit dashboard. Use that secret for making request