# Actions: api.redirect socumentation/source code

**URL:** <https://community.auth0.com/t/actions-api-redirect-socumentation-source-code/68620>\
**Category:** Get Help\
**Created:** [August 26, 2021, 1:31pm UTC](https://community.auth0.com/t/actions-api-redirect-socumentation-source-code/68620 "2021-08-26T13:31:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![steven.varga](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/steven.varga/32/31288_2.png) [@steven.varga](https://community.auth0.com/u/steven.varga)\
**Post date:** [August 26, 2021, 1:31pm UTC](https://community.auth0.com/t/actions-api-redirect-socumentation-source-code/68620/1 "2021-08-26T13:31:46Z")

</div>

This page on [post login actions](https://auth0.com/docs/actions/triggers/post-login#social) describes some `api.redirect` methods. Does anyone happened to know where they are documented, or possibly the source code location?  
`sendUserTo` - do you have to manually craft the `URI` or is there a simpler way? The following doesn’t work for me:

```auto
api.redirect.sendUse("https://my-app.example.com",{
    {some_key: 'value'}
})

```

Is the `query` in the example a way to control it?

```auto
  // Send the user to https://my-app.example.com along
  // with a `session_token` query string param.
  api.redirect.sendUserTo("https://my-app.example.com", { 
    query: { session_token: token }
  });

```

best wishes: steven

---

<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:** [August 26, 2021, 9:36pm UTC](https://community.auth0.com/t/actions-api-redirect-socumentation-source-code/68620/3 "2021-08-26T21:36:54Z")

</div>

Hi @steven.varga,

Have you seen this doc?

> **[Redirect with Actions](https://auth0.com/docs/customize/actions/flows-and-triggers/login-flow/redirect-with-actions)**
>
> Learn how to use post-login Actions to redirect users before an authentication transaction is complete.

It shows how to encode data in a session token and pass it to the external site.

---

<div class="post-metadata">

**Author:** ![steven.varga](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/steven.varga/32/31288_2.png) [@steven.varga](https://community.auth0.com/u/steven.varga)\
**Post date:** [August 26, 2021, 11:06pm UTC](https://community.auth0.com/t/actions-api-redirect-socumentation-source-code/68620/4 "2021-08-26T23:06:16Z")

</div>

@dan.woda Hi Dan, thanks! Yes I have seen it, didn’t take the `call` for a ride yet. This is to deliver `prompt`, so I managed to do it with passing

```auto
api.redirect.sendUserTo("https://my-app.example.com", { 
{query: {key:'value'}}
});

```

then from the Universal Login Page, I could get the parameters in `config.extraParams`.

```auto
var config = JSON.parse(
              decodeURIComponent(escape(window.atob('@@config@@')))
          );
console.log(config.extraParams);

```

This to prototype a flow, so I can do it with ACTIONs

```auto
[database | social | ...](login) -> login page -> 
conditionally redirect to get more information ->
... -> 
complete the flow ->
return from post login ACTION

```

So far things work out, no final code yet…  
best: steve

---

<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:** [August 30, 2021, 5:24pm UTC](https://community.auth0.com/t/actions-api-redirect-socumentation-source-code/68620/5 "2021-08-30T17:24:35Z")

</div>

Great, let us know if you run into anything.

---

<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:** [October 13, 2021, 6:41pm UTC](https://community.auth0.com/t/actions-api-redirect-socumentation-source-code/68620/6 "2021-10-13T18:41:29Z")

</div>

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