
PatriciaD.95901 (Customer) asked a question.
Hello,
I have a problem.
I use the API to get an activationLink returned by the function "activate" with sendEmail = false. It returns a link to me, that I want to use in a self-custom email.
The problem is that when clicking on the link in my email, which is sent to the users, the link is always expired.
I don't understand why ? Is it possible to use the activationLink in a non-Okta email ? Or is there another way to to do it ?
Thanks

Hi Patricia,
Are you creating a User without Credentials or with Credentials ? Have you tried to click on link obtained other than email, probably using Postman to activate user? is it working ? how long it take to receive activation link via custom email and clicking on link? make sure the timeout as below.
By default, the activation email is valid for one day. This can be edited by performing the followings steps:
Have you check ${org.activationTokenExpirationHours} value what is going ?
Also check - default value for "Activation emails are valid for"
By default, the activation email is valid for one day. This can be edited by performing the followings steps:
Hello, thanks for your answers.
A little more informations about your remarks :
by looking at your comment it look like you done it right way. I think you should create a case with Okta for further troubleshooting.
Thanks to all for your help. It appeared that the piece of code, where is embedded the code to manage the Okta activation link, was called twice. I was getting the result of the first call but the other call was generating another token. So my token was expired. The problem is now solved... hard trick to find out this weird behaviour ! Thanks !