How to create Apikey to call users okta api from java code

Hi All,

I have a method to create users , before creating users we have to create same user in okta. To call users api from okta, i have to generate apikey to add in the request.
How to generate apikey from java code??

Hi there!

Go into your admin dashboard then ‘Security’ -> ‘API’.

Hi, Thanks for the reply… From admin dashboard i am able to get the apikey and that is working also by hardcoding in my properties file.
But i have to generate apikey from java code and then call the /users api.
Please let me know how to do this ?

For now there is no way to generate an api key.

There are some early access feature (api) that allows you to get an api key for a specific tenant however you are required to have another verified api key to be able to do it.

Why do you need to generate a new api token each time?

1 Like