Jump to content
  • Sign Up

Last Login Timestamp?


Guddler.2569

Recommended Posts

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.

Link to comment
Share on other sites

  • ArenaNet Staff

@"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?

Link to comment
Share on other sites

  • ArenaNet Staff

@"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.

Link to comment
Share on other sites

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 :/

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
Share on other sites

  • 2 weeks later...

@Daniel Snider.6241 said:

@"Guddler.2569" said:Hi there,

I see a similar question here but that is related to guilds:

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?

YES I know our 4 guild community would find something like this very useful. I'm rather new to API key use, but have managed to build an excel data sheet that I can search guild member names in all of the guilds at once. Now I'm experimenting with the other API features, and was looking to see if this was an option to be able to search and sort by the other parameters like achievement points and when they were last online, like you can while in-game. So for large guild community management it would be a nice feature to add the same search parameters that are in-game. However being new to this type of knowledge, I'm not sure how that can be added in.if at all.

Link to comment
Share on other sites

  • 4 weeks later...

@Daniel Snider.6241 said:Does this sound like something useful?

This would be very useful for me for an account management type of app that I've been working on. I've been trying to figure out handling a sort of alert system to warn users if they haven't logged in since the last living story, or if they want to be reminded to get their daily login rewards on multiple accounts if they have multiple accounts, etc.

Last update at the character level would work fine for my purposes so long as it means that they actually logged in past character select which (if I understand correctly) is what triggers getting daily rewards/LS unlocks etc.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...