"error": "invalid_client"

98 views
Skip to first unread message

Can

unread,
Sep 23, 2024, 6:05:04 AMSep 23
to FatSecret Platform API
  Even though I provided the IP, I am still getting an "invalid client" error. It's been 20 hours now.  

Mikael Tenshio

unread,
Sep 23, 2024, 6:16:22 AMSep 23
to FatSecret Platform API
can you provide more details about your problem
- error code
- authentication type
- some code

i think the ip is use for white listing to restrict any other device to request even if they have your secret

Can

unread,
Sep 23, 2024, 7:06:36 PMSep 23
to fatsecret-p...@googlegroups.com
curl example
image.png
code ex
image.png

Mikael Tenshio <mikoc...@gmail.com>, 23 Eyl 2024 Pzt, 13:16 tarihinde şunu yazdı:
--
You received this message because you are subscribed to the Google Groups "FatSecret Platform API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fatsecret-platfor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fatsecret-platform-api/72096c82-b6be-4eb7-a94d-db3daceee785n%40googlegroups.com.

Mikael Tenshio

unread,
Sep 23, 2024, 10:10:26 PMSep 23
to FatSecret Platform API
the error indicates that it failed to retrieve the access token. before making any request to any food data you need to make sure you already has the access token.

you can try requesting for access token first.

try this 

curl -X POST "https://oauth.fatsecret.com/connect/token" \
     -H "Content-Type: application/x-www-form-urlencoded" \
     -u "$CLIENTID:$CLIENTSECRET" \
     -d "grant_type=client_credentials&scope=basic"

you need to make sure your id and secret is correct, and there is also an error invalid client it's an issue in your credentials

Can

unread,
Sep 30, 2024, 5:50:38 AMSep 30
to fatsecret-p...@googlegroups.com
i already did that but still i take invalid client error

Mikael Tenshio <mikoc...@gmail.com>, 24 Eyl 2024 Sal, 05:10 tarihinde şunu yazdı:

Can

unread,
Oct 21, 2024, 3:37:09 PMOct 21
to fatsecret-p...@googlegroups.com
can you help me? i still take invalid_client error

Mikael Tenshio <mikoc...@gmail.com>, 24 Eyl 2024 Sal, 05:10 tarihinde şunu yazdı:
the error indicates that it failed to retrieve the access token. before making any request to any food data you need to make sure you already has the access token.

Mikael Tenshio

unread,
Oct 21, 2024, 8:59:50 PMOct 21
to fatsecret Platform API
it seems that it's been too long, and you are still struggling about the issue. if you really tried your best and try to find solution every day and not find it.

curl -u CLIENT_ID:CLIENT_SECRET -d "grant_type=client_credentials&scope=premier" -X POST https://oauth.fatsecret.com/connect/token

for that command example even though I don't use curl I try that command in cmd terminal, it is very straightforward and work perfectly just make sure your client is correct. please check again your client id and secret in your account. Good morning
Reply all
Reply to author
Forward
0 new messages