Thread:Project:Support desk/Check if I'm logged in/reply (3)

I first thought that querying API:Login might be the right API to use, but it seems like it does not give you that information. Instead the page tells you to use the assert parameter.

I did not know of the Assert API up to now, but reading the page, I think that a request with assert=user should be what you are looking for. Afterwards you get a result from the API: If this result contains the error message assertuserfailed, then the user is not logged in.

I guess we all agree that the page API:Assert really could have more information on it and maybe also an example on how to use this API. It would be great, if we could use this support request to add that!