# Service account for API tokens

**URL:** <https://devforum.okta.com/t/service-account-for-api-tokens/7928>\
**Category:** Questions\
**Created:** [February 3, 2020, 7:02pm UTC](https://devforum.okta.com/t/service-account-for-api-tokens/7928 "2020-02-03T19:02:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rbro](https://avatars.discourse-cdn.com/v4/letter/r/8e8cbc/32.png) [@rbro](https://devforum.okta.com/u/rbro)\
**Post date:** [February 3, 2020, 7:02pm UTC](https://devforum.okta.com/t/service-account-for-api-tokens/7928/1 "2020-02-03T19:02:05Z")

</div>

Hello,

I currently have an API token under my user account, but I see that the below page recommends “Okta recommends generating API tokens from a service account with permissions that do not change”:

[https://help.okta.com/en/prod/Content/Topics/Security/API.htm](https://help.okta.com/en/prod/Content/Topics/Security/API.htm)

My question is: what are the best practices for setting up a service account? For example:

- is a service account just a regular user under Directory - People, or is there another way to set-up a service account?

- my Okta account currently has multifactor enabled. Since many people will be sharing this service account, how do you log into it with multifactor?

Thanks,  
Ryan

---

<div class="post-metadata">

**Author:** ![dragos](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/dragos/32/1313_2.png) [@dragos](https://devforum.okta.com/u/dragos)\
**Post date:** [February 4, 2020, 1:50am UTC](https://devforum.okta.com/t/service-account-for-api-tokens/7928/2 "2020-02-04T01:50:05Z")

</div>

Hi @rbro

As service accounts are a sensible part of the infrastructure (eg. used to set-up Okta AD Agents), they should be created directly in Okta and not Active Directory.

Regarding MFA, this depends on the company’s policy and the users that will have access to it. The easiest solutions to implement are security question (user will need to enter a specific answer) or email authentication (an email is sent to a distribution list, such as [it-department@company.com](mailto:it-department@company.com), so that the authentication is visible to multiple people and does not rely on a single person).

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [January 24, 2024, 6:45pm UTC](https://devforum.okta.com/t/service-account-for-api-tokens/7928/3 "2024-01-24T18:45:37Z")

</div>

Closed on January 24, 2024, 6:45pm UTC

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