Last Login Timestamp? — Guild Wars 2 Forums

Last Login Timestamp?

Hi there,

I see a similar question here but that is related to guilds:
https://en-forum.guildwars2.com/discussion/21361/request-last-login-time-for-guild-roster

Is it possible to get the last time I logged in to my account via API? I don't explicitly see anything under account. Is there an indirect way?

If not, could a simple last_login be added to the account response (or some other appropriate name)? I'm surprised this is not a more frequently requested feature (assuming it can't already be done).

Thanks.

Tagged:

Comments

  • Nokomis.5076Nokomis.5076 Member ✭✭✭

    Out of curiousity: For what would that information be good?

    "Hmm I wonder, how long I haven't been in GW2. Oh let's look at the API"?

    Was I able to help you or give you a hint? Click on Helpful and/or Thumbs up, I would appreciate it alot!
    When you encounter a bug ingame, at first you should file a ticket via the ingame command /bug, as only this way the devs will know exactly where you were, when the bug happened.

  • edited November 16, 2018

    @Guddler.2569 said:
    Hi there,

    I see a similar question here but that is related to guilds:
    https://en-forum.guildwars2.com/discussion/21361/request-last-login-time-for-guild-roster

    Is it possible to get the last time I logged in to my account via API? I don't explicitly see anything under account. Is there an indirect way?

    If not, could a simple last_login be added to the account response (or some other appropriate name)? I'm surprised this is not a more frequently requested feature (assuming it can't already be done).

    Thanks.

    I definitely think this definitely warrants looking into.

    Some API users workaround this lack of information by caching the account age and comparing after each lookup to see if the number has increased (which indicates the account was used). This is obviously not a solution for apps that want to see how recently the player logged in (without constantly polling the API) and it's certainly an added burden to any app developer.

    As far as I can tell without a full investigation, it would actually be quite difficult to expose a last_login field. On the other hand, it is much easier to expose something like a last_updated field for account and character data, which you could perhaps interpret in a useful way.

    Does this sound like something useful?

  • @Nokomis.5076 said:
    Out of curiousity: For what would that information be good?

    "Hmm I wonder, how long I haven't been in GW2. Oh let's look at the API"?

    I think it is useful for applications that accept other players' API keys and want to gather information on how long ago the account was active.

  • Specifically, I want to know if any of my items have sold since I've last logged in. I can see my transactions and when someone purchased the item and I can remember a mental note of whether that time is after the last time I logged out but programmatically that doesn't leave me any way to know.

    Hmm, thinking that one through, that means what I really want the 'last_login' to reflect is actually 'last_logout' but I guess that may be more awkward as a login is far more likely to be audited than a logout, especially if it wasn't an orderly logout. OK, I can see that might be more difficult :/

  • As far as I can tell without a full investigation, it would actually be quite difficult to expose a last_login field. On the other hand, it is much easier to expose something like a last_updated field for account and character data, which you could perhaps interpret in a useful way.

    Does this sound like something useful?

    Apologies, I didn't fully read your reply before posting. Actually, I'd be quite surprised if some kind of 'last_updated' wouldn't be pretty close to what I was looking for.

    I don't 100% know where I'm going with this yet, I'm at the stage of hitting URLs in a browser to see what kind of stuff is available and how I could use it but I certainly have a couple of ideas kicking about. Whether I put some simple script together just for my personal use or put together some kind of app I have no idea. I'm a developer by profession and just curious right now.

  • If I may, I'd like to suggest to go one step further. Please also add a last_login, last_update and/or last_logout field to each character data set.

    My use of it would be a step on an automated todo list app. I have some characters standing next to rich ore nodes or similar spots, and if each of them has last_logout > beginning of today, this task is done. :)

    Another, more broadly useful, possibility this opens is detecting whether a character has had birthday since they were last logged in. So I think something like gw2efficiency could make good use of this, too.

  • OK, so it's already been a while since I started to look at this. As is often the way I found an endpoint that gives me what I need for one of my "things" already:
    https://wiki.guildwars2.com/wiki/API:2/commerce/delivery

    Apart from it doesn't. Why would I get the following response back?:
    { "coins": 245, "items": [] }

    So, coins have been given for selling nothing?? (Note that it's late and I have not logged in tonight and therefore haven't actually looked at my history). I figured that if coins > 0 then items would always contain something? Was I wrong?

    I don't have anything major in the TP but I have been chucking stuff that I appear to be able to get more on the TP than from a vendor so I would expect to see one or more items listed there.

  • Ahh, ignore me. Re-reading the API description for that I get it now :)

  • SkyShroud.2865SkyShroud.2865 Member ✭✭✭✭

    Second this, would love to see a "last" field. That would at least help me free up one rank aka "inactive" which I used to help my logger to identify different types of kicking.

    Founder & Leader of Equinox Solstice [TIME], a Singapore-Based International PvX Guild
    Henge of Denravi Server
    www.gw2time.com

    --

    Explanations of WvW Structures & Populations Issues

©2010–2018 ArenaNet, LLC. All rights reserved. Guild Wars, Guild Wars 2, Heart of Thorns, Guild Wars 2: Path of Fire, ArenaNet, NCSOFT, the Interlocking NC Logo, and all associated logos and designs are trademarks or registered trademarks of NCSOFT Corporation. All other trademarks are the property of their respective owners.