messenger-bot-tutorial icon indicating copy to clipboard operation
messenger-bot-tutorial copied to clipboard

Getting error in Step 4. (Curl) Invalid OAuth

Open theankitgaurav opened this issue 9 years ago • 8 comments

Getting this error message when I am trying to use the CURL command

{"error":{"message":"Invalid OAuth access token.","type":"OAuthException","code":190,"fbtrace_id":"DPBNtgEihPS"}}

theankitgaurav avatar Jul 08 '16 17:07 theankitgaurav

I get this error as well.

Ketelsen avatar Jul 09 '16 21:07 Ketelsen

I get it too

egrish avatar Aug 03 '16 14:08 egrish

Same here anyone found the problem?

Update: I seemed to have gotten around it with trial and error here is what I did.

First make sure you type =page_access_token not =<page_access_token> I also added a namespace and app domain and website URL in the basic setting section of the app.

I'm not certain which of these solved the problem but I'd guess at dropping the <> syntax.

Hope that helps.

keronk avatar Sep 03 '16 23:09 keronk

The problem is with the curl's syntax. Instead of (<> vs {}) curl -X POST "https://graph.facebook.com/v2.7/me/subscribed_apps?access_token=" use curl -X POST "https://graph.facebook.com/v2.7/me/subscribed_apps?access_token={token}"

The v2.7 or v2.6 makes no difference - it works with both.

Hope it helps.

peteanusergiu avatar Sep 08 '16 07:09 peteanusergiu

In v2.8 you should use only this: curl -X POST "https://graph.facebook.com/v2.7/me/subscribed_apps?access_token="

Arif1310 avatar Dec 14 '16 03:12 Arif1310

just get rid of those angle brackets around the token...and you will be just fine for example

curl -X POST "https://graph.facebook.com/v2.6/me/subscribed_apps?access_token=EAAJ22uv7dO8BAEwvZApIIfLyhmgRjE00a3XHiZAnm3ZBqfzJkMX4GoCjnXCbI5IOBINLP5443v8szAYcvcQSbZB8B2WAbxMGIX5mU"

smilingsorav avatar Jul 19 '17 12:07 smilingsorav

I have had this issue as well and solved it but now there is another typer of error : 2500. The message is "An active access token must be used to query information about the current user". I am confused, any help ?

LuisBlanche avatar Oct 09 '17 12:10 LuisBlanche

@LuisBlanche Try to generate token again.

abhinandansrivastava avatar Mar 12 '18 12:03 abhinandansrivastava