You need to store also refresh_token and use this token for get a new access_token
You can look : https://github.com/PowerAruba/PowerArubaCL/blob/master/PowerArubaCL/Private/Token.ps1#L16
------------------------------
PowerArubaSW : Powershell Module to use Aruba Switch API for Vlan, VlanPorts, LACP, LLDP...
PowerArubaCP: Powershell Module to use ClearPass API (create NAD, Guest...)
PowerArubaCL: Powershell Module to use Aruba Central
PowerArubaCX: Powershell Module to use ArubaCX API (get interface/vlan/ports info)..
ACEP / ACMX #107 / ACDX #1281
------------------------------
Original Message:
Sent: Jun 27, 2024 04:06 PM
From: hornet24
Subject: API Gateway - Tokens and Refresh
Evening
Hope this makes sense - I'm trying to make a simple method of managing visitor wireless credentials, utilising a Microsoft Form and Power Automate.
I've written the flow and it works a treat, but I'm butting up against the 2hr limit on tokens and I'm really not sure how to handle this?
Hoping for some advice on the best way to deal with this, as the flow is stateless (within reason) and it is difficult to have logic renewing the token every couple of hours that the main flow can use when somebody requests a visitor password.
Any advice and pointers on this are welcome
Cheers