# Authenticating my API after Universal Login

**URL:** <https://community.auth0.com/t/authenticating-my-api-after-universal-login/58619>\
**Category:** Get Help\
**Tags:** jwt, api, auth0\
**Created:** [February 27, 2021, 7:25am UTC](https://community.auth0.com/t/authenticating-my-api-after-universal-login/58619 "2021-02-27T07:25:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vnp01](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/vnp01/32/26551_2.png) [@vnp01](https://community.auth0.com/u/vnp01)\
**Post date:** [February 27, 2021, 7:25am UTC](https://community.auth0.com/t/authenticating-my-api-after-universal-login/58619/1 "2021-02-27T07:25:20Z")

</div>

Hi,

I am building a website and was planning to use the Universal Login for authentication. But I also need to call my own API after the user logs in/ signs up by passing the ID token to my API.

Is this possible?

---

<div class="post-metadata">

**Author:** ![sgo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sgo/32/13789_2.png) [@sgo](https://community.auth0.com/u/sgo)\
**Post date:** [February 27, 2021, 9:52am UTC](https://community.auth0.com/t/authenticating-my-api-after-universal-login/58619/2 "2021-02-27T09:52:38Z")

</div>

Hi @vnp01 , welcome to the community!

We have a series of guides on how to call APIs for the different Authentication and Authorization flows here:

> **[Authentication and Authorization Flows](https://auth0.com/docs/get-started/authentication-and-authorization-flow)**
>
> Learn about the various flows used for authentication and authorization of applications and APIs.

I’d recommend finding your flow of choice there and reviewing the relevant “_Call API using …_” link.

As for passing ID Tokens to an API, this should not be used for Authentication/Authorization purposes, instead you should pass an **Access Token** to your APIs for the purpose of granting access to the API/making authorization decisions. Your APIs should then verify the Access token, please see the below links for more information:

> **[ID Tokens](https://auth0.com/docs/secure/tokens/id-tokens)**
>
> Describes how ID Tokens are used in token-based authentication to cache user profile information and provide it to a client application.

> **[Access Tokens](https://auth0.com/docs/secure/tokens/access-tokens)**
>
> Describes how access tokens are used in token-based authentication to allow an application to access an API after a user successfully authenticates and authorizes access.

---

<div class="post-metadata">

**Author:** ![vnp01](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/vnp01/32/26551_2.png) [@vnp01](https://community.auth0.com/u/vnp01)\
**Post date:** [February 27, 2021, 3:17pm UTC](https://community.auth0.com/t/authenticating-my-api-after-universal-login/58619/3 "2021-02-27T15:17:34Z")

</div>

Hey @sgo Thank you for reply!  
I will certainly go through these documentation.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [March 1, 2021, 10:48am UTC](https://community.auth0.com/t/authenticating-my-api-after-universal-login/58619/4 "2021-03-01T10:48:13Z")

</div>

Let us know if you have any further questions!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 16, 2021, 10:48am UTC](https://community.auth0.com/t/authenticating-my-api-after-universal-login/58619/5 "2021-03-16T10:48:40Z")

</div>

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