# Login to external URL using tokens with post method

**URL:** <https://forum.inductiveautomation.com/t/login-to-external-url-using-tokens-with-post-method/68362>\
**Category:** Ignition\
**Tags:** ignition81, scripting, perspective\
**Created:** [January 9, 2023, 8:53am UTC](https://forum.inductiveautomation.com/t/login-to-external-url-using-tokens-with-post-method/68362 "2023-01-09T08:53:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeffrey.boey](https://avatars.discourse-cdn.com/v4/letter/j/6a8cbe/32.png) [@jeffrey.boey](https://forum.inductiveautomation.com/u/jeffrey.boey)\
**Post date:** [January 9, 2023, 8:53am UTC](https://forum.inductiveautomation.com/t/login-to-external-url-using-tokens-with-post-method/68362/1 "2023-01-09T08:53:31Z")

</div>

Hi, is there a way to use the sytem.perspective.navigate but with a Header included to navigate to a website? My situation is I need a button to redirect user to a URL, but the URL requires a token in the header to authenticate. If I just use the URL it gives me

> "detail": "Authentication credentials were not provided."  
> ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/e/eea9f2fb6c2f0b9eec347d4a7da50b4d24d5bff9.png)

But if I use the sytem.net.httpPost function, it returns the webpage's HTML as string and doesn't open a new page.

Anybody had to do something like this before?

Cheers

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [January 9, 2023, 5:40pm UTC](https://forum.inductiveautomation.com/t/login-to-external-url-using-tokens-with-post-method/68362/2 "2023-01-09T17:40:04Z")

</div>

No, this isn't possible. We perform a direct navigate to the new page, equivalent to a GET request, with no additional headers attached.

Actually, on further thought, I'm pretty sure this is impossible in general. The only way web browsers support passing context to a new page is a form submission from the first page, as far as I know.

---

<div class="post-metadata">

**Author:** ![jeffrey.boey](https://avatars.discourse-cdn.com/v4/letter/j/6a8cbe/32.png) [@jeffrey.boey](https://forum.inductiveautomation.com/u/jeffrey.boey)\
**Post date:** [January 9, 2023, 6:06pm UTC](https://forum.inductiveautomation.com/t/login-to-external-url-using-tokens-with-post-method/68362/3 "2023-01-09T18:06:48Z")

</div>

Hi @paul-griffith , thanks for coming to my rescue again 😃

I'm not familiar with token authentications, I assumed this url uses POST because having the token readable in GET request is a security risk.

So using a button to auto authenticate is impossible in ignition?

I think I have seen codes in ajax functions in JS that uses POST to send login credentials to the new page to perform a seamless login experience.

I can use the button to redirect the user to the login URL of this 3rd party website instead, and they log in manually, but that ruins the seamless experience I was aiming for 😅
