Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook API returns "Invalid OAuth access token signature."

For my website I use the Facebook API to get the events from a few Facebook pages. For this purpose I have created a Facebook app.

However, even though this used to work before, the API now returns an error:

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

Here are the steps to reproduce the error:

  1. Go to app's dashboard on https://developers.facebook.com/apps

  2. Get the app id (APP_ID) and the app secret (APP_SECRET)

  3. Use the app id and the app secret to get an access token by using this url:

    https://graph.facebook.com/oauth/access_token?client_id=APP_ID &client_secret=APP_SECRET&grant_type=client_credentials

  4. This returns something like

    {"access_token":"123412342134|f34f34f32fc3rc4rc324r-X","token_type":"bearer"}

  5. I then use this access token to access the events

    https://graph.facebook.com/v2.12/{11239244970}/events/?fields={id,name}&access_token={123412342134|f34f34f32fc3rc4rc324r-X}

  6. However, this returns the error mentioned above, "Invalid OAuth access token signature.".

I'm stuck here. None of the posts on here seem to solve my problem.

I've already tried resetting the app secret, but that didn't help. Any hints are greatly appreciated!

like image 724
Sebastian Avatar asked Sep 14 '25 14:09

Sebastian


1 Answers

To get the Client Access Token for an app, do the following:

Sign into your developer account. On the Apps page, select an app to open the dashboard for that app. On the Dashboard, navigate to Settings > Advanced > Security > Client token.

https://developers.facebook.com/docs/facebook-login/guides/access-tokens#errors

like image 102
Jean Rose Prayco Avatar answered Sep 17 '25 19:09

Jean Rose Prayco