Invalid/expired timestamp

45 views
Skip to first unread message

Камиль Мифтахов

unread,
Apr 7, 2025, 7:09:30 AM4/7/25
to fatsecret Platform API
Hi
I get "Invalid/expired timestamp" error while use your official postman collection on "/food-entries/v2" request
accessToken and requestToken from 3-legged auth works fine

I've checked timestamp with one from https://www.unixtimestamp.com/index.php. They was the same

What is going wrong?

Screenshot 2025-04-07 at 13.17.39.png

seba...@fatsecret.com

unread,
Apr 7, 2025, 7:10:15 AM4/7/25
to fatsecret Platform API
Thanks for reaching out. Can you please try using OAuth1.0 first and then re-configure the way you are requesting OAuth2.0 tokens?

Камиль Мифтахов

unread,
Apr 7, 2025, 5:12:29 PM4/7/25
to fatsecret Platform API

Test
понедельник, 7 апреля 2025 г. в 14:10:15 UTC+3, seba...@fatsecret.com:

Камиль Мифтахов

unread,
Apr 7, 2025, 5:12:35 PM4/7/25
to fatsecret Platform API
I'm using OAuth 1.0 currently and can't use 2.0 for profile requests 
Now I'm playing with your postman collection 
Firstly I make requestToken OAuth 1.0 call which works fine (see log in first picture)
Then I make accessToken OAuth 1.0 call which also works fine (see log in second picture)
Finally I make  foodEntires OAuth 1.0 call which show me "Invalid timestamp error" (see log in last)

понедельник, 7 апреля 2025 г. в 14:10:15 UTC+3, seba...@fatsecret.com:
Thanks for reaching out. Can you please try using OAuth1.0 first and then re-configure the way you are requesting OAuth2.0 tokens?
requestToken.png
foodEntries.png
accessToken.png

Камиль Мифтахов

unread,
Apr 8, 2025, 2:03:02 AM4/8/25
to fatsecret Platform API
Now I'm getting same error even for request_token

Request
GET https://authentication.fatsecret.com/oauth/request_token?oauth_consumer_key=25cb75d63a1d4440b3deef33b87ecb7f&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1744091059&oauth_nonce=RnmRFRZK0kp&oauth_version=1.0&oauth_callback=https%3A%2F%2Foauth.pstmn.io%2Fv1%2Fcallback&oauth_signature=Ktk%2BieO%2FdgvcjM8bgBCd4PQCwSQ%3D400

Response
HTTP/1.1 400 Bad Request
Date: Tue, 08 Apr 2025 05:44:19 GMT
Invalid / expired Token: 1744091059


I can't understand why because 1744091059 UNIX seconds is equal to 08 Apr 2025 05:44:19 GMT (which is your server time)
вторник, 8 апреля 2025 г. в 00:12:35 UTC+3, Камиль Мифтахов:
Reply all
Reply to author
Forward
0 new messages