# Oauth 2.0 Tokens vs API Tokens

**URL:** <https://devforum.okta.com/t/oauth-2-0-tokens-vs-api-tokens/15263>\
**Category:** OAuth/OIDC\
**Created:** [July 26, 2021, 9:59am UTC](https://devforum.okta.com/t/oauth-2-0-tokens-vs-api-tokens/15263 "2021-07-26T09:59:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![olaOmori](https://avatars.discourse-cdn.com/v4/letter/o/f08c70/32.png) [@olaOmori](https://devforum.okta.com/u/olaOmori)\
**Post date:** [July 26, 2021, 9:59am UTC](https://devforum.okta.com/t/oauth-2-0-tokens-vs-api-tokens/15263/1 "2021-07-26T09:59:01Z")

</div>

Hello, I am beginner in Okta and I just started reading the docs.  
I’d like to ask what is the use case (best practice) to use api tokens or oauth 2.0 tokens (e.g. client credentials flow)?

I am building a middleware web-service.

---

<div class="post-metadata">

**Author:** ![tyty](https://avatars.discourse-cdn.com/v4/letter/t/35a633/32.png) [@tyty](https://devforum.okta.com/u/tyty)\
**Post date:** [July 26, 2021, 2:59pm UTC](https://devforum.okta.com/t/oauth-2-0-tokens-vs-api-tokens/15263/2 "2021-07-26T14:59:30Z")

</div>

Hey There! we recommend using jwt (oauth) wherever possible - Most Okta [endpoints support OAuth](https://developer.okta.com/docs/guides/implement-oauth-for-okta/scopes/). Here’s a guide that goes over [OAuth for Okta](https://developer.okta.com/docs/guides/implement-oauth-for-okta/overview/), which is sounds like you might be interested in. Some more on JWTs in general can be found [here](https://developer.okta.com/blog/2020/12/21/beginners-guide-to-jwt).

---

<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:** [February 10, 2024, 12:50am UTC](https://devforum.okta.com/t/oauth-2-0-tokens-vs-api-tokens/15263/3 "2024-02-10T00:50:17Z")

</div>

Closed on February 10, 2024, 12:50am UTC

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