Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook error: "(#100) Invalid parameter", "OAuthException", "code":100

In my messenger platform app, when I make this request:

GET https://graph.facebook.com/v2.8/${psid}?access_token=PAGE_ACCESS_TOKEN
(to get users public info based on their PSID), sometimes Facebook returns this error:

'There is an error when trying to get the user\'s info from Messenger:\nError: failed [400] {"error":{"message":"(#100) Invalid parameter","type":"OAuthException","code":100,"fbtrace_id":"FpUUkuX0egc"}}'

I have no idea why this happens, because when I saw the error then I manually made the same request (by using POSTMAN), I got the correct result (user public profile) with no error.

like image 890
sonlexqt Avatar asked Sep 12 '25 11:09

sonlexqt


1 Answers

I struggled with this issue for a long long time and finally managed to find the problem:

In one of my JSON's parameters, I had a value with an unknown character:

"יאל      בן רפל בהר"

instead of

 "יאל בן רפל בהר"

This character was removed by POSTMAN, and was later found out as a tab character (\t). Other, unknown characters were also removed.

The solution was to remove this value from the JSON along with other characters that may cause a bad request (such as tab):

value = value.Replace("\t", "").Replace("     ", "");

(This is a C# example)

like image 167
Koby Douek Avatar answered Sep 16 '25 07:09

Koby Douek