Forum Discussion

Peter_Taraldsen's avatar
Peter_Taraldsen
Contributor
4 years ago

Issues with batched queries

Hi,  I'm trying to create a batch request fetching the latest posts in a users favorite areas, the number of unread messages and the number of notifications. I have had some partial success so far ...
  • SuzieH's avatar
    SuzieH
    4 years ago

    Peter_Taraldsen I suspect that you're right about the notification counts being returned only for the user making the call. I wonder if there is something you can do by making the call with a session key for a different user. We have an example of this in Create subscriptions for another user

    This might be too heavy to do within the /batch endpoint tho -- if even possible... Keep performance in mind. AdamN TysonN thoughts?

    Requirements

    • You must have access to a user account with Switch to another user permission.
    • You must make your request using Session Key Authentication.


    Basic Steps

    • Create a session key for yourself using a Community account with the Switch to another user permission.
    • Create a second session key for the subscriber using your retrieved session key.
    • Make your query using the second session key.