# Get Current Access Token (Angular, browser: safari)

**URL:** <https://community.auth0.com/t/get-current-access-token-angular-browser-safari/94596>\
**Category:** Get Help\
**Tags:** clients, management-api\
**Created:** [November 17, 2022, 4:03am UTC](https://community.auth0.com/t/get-current-access-token-angular-browser-safari/94596 "2022-11-17T04:03:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![khawmingsheng](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/khawmingsheng/32/36488_2.png) [@khawmingsheng](https://community.auth0.com/u/khawmingsheng)\
**Post date:** [November 17, 2022, 4:03am UTC](https://community.auth0.com/t/get-current-access-token-angular-browser-safari/94596/1 "2022-11-17T04:03:27Z")

</div>

I need to get **current** access token ( **NOT RENEW** ), where can i find it? or how can I get it?  
cant find much info about that.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [November 28, 2022, 8:04pm UTC](https://community.auth0.com/t/get-current-access-token-angular-browser-safari/94596/3 "2022-11-28T20:04:03Z")

</div>

Hi @khawmingsheng,

You can use the `getAccessTokenSilently() ` method to retrieve an access token. **This will grab a valid token if it exists, or request a new one if the existing one is expired.**

Does that answer your question?

Here the FAQ for more info:

> <https://github.com/auth0/auth0-angular/blob/master/FAQ.md#8-retrieving-and-refreshing-a-token>

---

<div class="post-metadata">

**Author:** ![khawmingsheng](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/khawmingsheng/32/36488_2.png) [@khawmingsheng](https://community.auth0.com/u/khawmingsheng)\
**Post date:** [November 29, 2022, 3:26pm UTC](https://community.auth0.com/t/get-current-access-token-angular-browser-safari/94596/4 "2022-11-29T15:26:01Z")

</div>

hi, thanks for reply, However, `getAccessTokenSilently()` doesn’t seems to work in safari browser. I have turn on refresh token too but it also not working.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [November 29, 2022, 3:50pm UTC](https://community.auth0.com/t/get-current-access-token-angular-browser-safari/94596/5 "2022-11-29T15:50:57Z")

</div>

What do you mean? Are you seeing errors?

---

<div class="post-metadata">

**Author:** ![khawmingsheng](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/khawmingsheng/32/36488_2.png) [@khawmingsheng](https://community.auth0.com/u/khawmingsheng)\
**Post date:** [November 29, 2022, 4:10pm UTC](https://community.auth0.com/t/get-current-access-token-angular-browser-safari/94596/6 "2022-11-29T16:10:45Z")

</div>

```auto
this.auth.getAccessTokenSilently({ detailedResponse: true }).subscribe(
            (res) => {
                console.log(res);
                //my code
            },
            (err) => {
                console.log(err);
            }
        );

```

this is the code block, for chrome it works perfectly but in safari, it didnt return anything in the console.

the following is my config

```auto
{
        "domain": "my-domain.auth0.com",
        "clientId": //my clientId,
        "cacheLocation": "localstorage",
        "responseType": "token",
        "audience": "https://my-website.com/api",
        "useRefreshTokens": true
    }

```

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [December 12, 2022, 2:57pm UTC](https://community.auth0.com/t/get-current-access-token-angular-browser-safari/94596/7 "2022-12-12T14:57:41Z")

</div>

I apologize for the delay.

Could you please DM me a [HAR](https://auth0.com/docs/troubleshoot/guides/generate-har-files) of the transaction from safari? I would like to see what is happening when you make this call.

---

<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:** [December 26, 2022, 2:58pm UTC](https://community.auth0.com/t/get-current-access-token-angular-browser-safari/94596/8 "2022-12-26T14:58:22Z")

</div>

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