We want an ability to track custom activities for anoymous users.
Trying to do this using Rest API.
Step 1 is failing, The API is not returning the Anonymous Lead when queried using the token.
Any Suggestions ?
You can't.
CAs are for named leads in your db.
The only way you could simulate this would be by logging a temporary standard Munchkin activity and later (after lead promotion from anon -> named) reading it out and calling back in via API.
Or, of course, by saving the CA info offline and batching it later -- which is the only business-class way to use CAs anyway, given low rate limits and associated security/reliability risks.