How to automate activating user over API


I need bit of help with activating user over API.

We are using Cypress to do all our UI automation and we are preparing our test data over API.
When I create user, the user gets email with activation link. User clicks the activation link and fills out required inputs like password, security question etc… then hits submit and user is activated.

The thing is we dont want to do that over UI, we want to do that over API which is faster and more reliable.
The issue is I didnt find a way to do this. When I GET in postman the activation link that user gets in the mail. I get a html page in response. I found the xcsfr token and I am trying to send the request to the user/welcome/login/internal and security/xsrf-token with filled data like on frontend. But no luck. Sadly we dont have the endpoints for activating the user like I have found here. Test the Okta REST APIs using Postman | Okta Developer

What about creating the user with a password (AND a recovery question if you want) and immediately activating them?

That way you don’t have to try to follow the activation link and fill out the welcome page and instead handle all of that set-up via API.

Hello @andrea,
we dont have endpoints for this. But I already raised issue to our developers to work on them.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.