# OAuth2 Tokens Scripting

**URL:** <https://forum.inductiveautomation.com/t/oauth2-tokens-scripting/40158>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [October 30, 2020, 2:21am UTC](https://forum.inductiveautomation.com/t/oauth2-tokens-scripting/40158 "2020-10-30T02:21:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryanjmclaughlin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryanjmclaughlin/32/4318_2.png) [@ryanjmclaughlin](https://forum.inductiveautomation.com/u/ryanjmclaughlin)\
**Post date:** [October 30, 2020, 2:21am UTC](https://forum.inductiveautomation.com/t/oauth2-tokens-scripting/40158/1 "2020-10-30T02:21:27Z")

</div>

I have a web API we are interfacing with that uses oauth2. We are using the API to pull data into Perspective to merge the cloud app data with some of our on-prem data.

Its fairly simple to get the tokens, but I was wondering if anyone has any experience or best practices with either functions they build to manage the creation of an access token (and refresh) or use a library to do this auth and management of the tokens.

---

<div class="post-metadata">

**Author:** ![mdia](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mdia/32/87599_2.png) [@mdia](https://forum.inductiveautomation.com/u/mdia)\
**Post date:** [February 14, 2022, 4:30pm UTC](https://forum.inductiveautomation.com/t/oauth2-tokens-scripting/40158/2 "2022-02-14T16:30:48Z")

</div>

Any luck running the httpGet function to get the info you need? I am trying the method that was used on this post: [OAuth2 connections - #4 by d3h637](https://forum.inductiveautomation.com/t/oauth2-connections/12366/4)  
but it isn’t working…

---

<div class="post-metadata">

**Author:** ![d3h637](https://avatars.discourse-cdn.com/v4/letter/d/13edae/32.png) [@d3h637](https://forum.inductiveautomation.com/u/d3h637)\
**Post date:** [May 25, 2023, 12:04am UTC](https://forum.inductiveautomation.com/t/oauth2-tokens-scripting/40158/3 "2023-05-25T00:04:27Z")

</div>

Sorry I didn't reply earlier. I honestly can't remember what the resolution is, or which project. I think we found another way to connect to the system.
