What if we don't give the fromdate and/or todate parameters in a /me call?
Will it give result of user of all times? It's not mentioned explicitly in documentation.
What if we don't give the fromdate and/or todate parameters in a /me call?
Will it give result of user of all times? It's not mentioned explicitly in documentation.
Yes, if you omit those parameters it will give you the expected result...
If a valid token is passed, then it will return the user ("There can be only one.") who obtained/approved that token.
For this route, the fromdate and todate parameters filter on the creation_date property of the user object.
So, if the authorized user signed up for his/her account outside of the range specified by any fromdate and/or todate values, then no user will be returned at all.
For example, user amit jha joined Stack overflow on June 22, 2015. If fetches from /me and... :
fromdate and todate blank, he gets a valid result.fromdate to 1472688000 (Sept 1st, 2016), he gets no result (no user object).fromdate to 1409529600 (Sept 1st, 2014), he gets a valid result.I can't imagine a legitimate use for this. The presence of these parameters for this route just adds clutter, and confusion, with no purpose.
And, ironically, /me/* routes that could benefit immensely from date parameters (like /me/inbox) don't have them!