Invite Token is Invalid, but it has actually expired

I have an invite link that has been working, I was able to invite 20 people successfully and then today it stopped working and I’m getting the ‘Your Invite Token is Invalid’ with the error in the console. I have the limit at 5000 invites. I can create a new invite and it works as expected. Any ideas? I’ve already sent the invite to a lot of people and would hate to have to send them a new code. I’m on latest tests passed.

2 Likes

Based on the path, the console errors are in a theme? Does this repro in safe mode? Can you repro the invite problem in incognito / anonymous mode in your browser?

2 Likes

What was the time span from when you created your token and it stopped working? I’m not sure if this setting will affect bulk invite tokens, but the default for user invite tokens is 30 days. I haven’t used bulk invitations, so I don’t know if there is a separate expiry time which will override this or not.
/admin/site_settings/category/users
invite expiry days 30
How long user invitation keys are valid, in days

2 Likes

Thank you Jim, I had missed that setting. This has fixed it. :+1:

3 Likes

@techapj can we improve this message so it says “Your invite token has expired” since that was the actual problem? “Invalid” doesn’t help us too much.

3 Likes

Oddly this problem has resurfaced again already. The console errors are coincidence as they do not show up in safe mode, but I do still get the invalid token error. I have invite_expiry_days set to 36500 now, which worked for a few days. I’m fine creating a new invite but I wanted to bring it up if anyone wants to look into it.

2 Likes

You are talking about Multiple Use Invite Links right? The “invite expiry days” setting does not apply on multiple use links. You are presented an option to set the expiry timeline at the time of generating invite link and it defaults to 30 days. You can see the expiry date for all the invite links on /u/username/invited/links page.

2 Likes

You’re right, I had set the expiry to 2099 on creation so I have no idea why changing that option made it work again, albeit briefly.

1 Like

Improved error message via:

3 Likes

I revoke my last comment, somehow the invite was set to expire a couple of days ago. I swear I did 2099, sorry! Thanks for the better message Arpit.

4 Likes