# Conver auth0-account-link-extensions to action

**URL:** <https://community.auth0.com/t/conver-auth0-account-link-extensions-to-action/129095>\
**Category:** Get Help\
**Tags:** other, missing-category\
**Created:** [March 6, 2024, 5:42pm UTC](https://community.auth0.com/t/conver-auth0-account-link-extensions-to-action/129095 "2024-03-06T17:42:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rhuan.carvalho](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rhuan.carvalho/32/47500_2.png) [@rhuan.carvalho](https://community.auth0.com/u/rhuan.carvalho)\
**Post date:** [March 6, 2024, 5:42pm UTC](https://community.auth0.com/t/conver-auth0-account-link-extensions-to-action/129095/1 "2024-03-06T17:42:36Z")

</div>

I’ve already converted all my rules into actions, but i can’t convert this extension code, is there any workaround for this?

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [March 6, 2024, 11:20pm UTC](https://community.auth0.com/t/conver-auth0-account-link-extensions-to-action/129095/2 "2024-03-06T23:20:42Z")

</div>

Hey there @rhuan.carvalho !

I recommend taking a look at the example found here:

> **[Link User Accounts](https://auth0.com/docs/manage-users/user-accounts/user-account-linking/link-user-accounts#example-account-linking-with-actions)**
>
> Understand how to link user accounts from various identity providers, so your users can authenticate from any account and be recognized by your app.

---

<div class="post-metadata">

**Author:** ![rhuan.carvalho](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rhuan.carvalho/32/47500_2.png) [@rhuan.carvalho](https://community.auth0.com/u/rhuan.carvalho)\
**Post date:** [March 8, 2024, 1:29pm UTC](https://community.auth0.com/t/conver-auth0-account-link-extensions-to-action/129095/4 "2024-03-08T13:29:12Z")

</div>

@ty.frith Hello, thanks for the reply !

```auto
await getManagementApiToken(event, api)
event.secrets.REDIRECT_SECRET
event.secrets.TENANT_DOMAIN

```

I don’t know how i can set this propertys and also, i don’t see any example of the getManagementeApiToken() function in the action example.  
Can you please help me on that?

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [March 14, 2024, 11:38pm UTC](https://community.auth0.com/t/conver-auth0-account-link-extensions-to-action/129095/5 "2024-03-14T23:38:26Z")

</div>

Hey @rhuan.carvalho no problem, happy to help!

Sorry for the delayed response here, but wanted to be sure and get back to you - The following topic does a great job outlining the steps needed to instantiate the management client:

[https://community.auth0.com/t/how-can-i-use-the-management-api-in-actions/64947#here-are-the-steps-for-using-the-management-api-in-a-custom-action-3](https://community.auth0.com/t/how-can-i-use-the-management-api-in-actions/64947#here-are-the-steps-for-using-the-management-api-in-a-custom-action-3)

`event.secrets.REDIRECT_SECRET` is just a random string that you create - Check out `options.secret` of `api.redirect.encodeToken(options)` [here](https://auth0.com/docs/customize/actions/flows-and-triggers/login-flow/api-object).

---

<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 28, 2024, 11:38pm UTC](https://community.auth0.com/t/conver-auth0-account-link-extensions-to-action/129095/6 "2024-03-28T23:38:30Z")

</div>

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