First call of getAccessToken() works against API, second call returns "User is not authorised to access this resource"

I have set up an Authorization Lambda that works fine. Using the test token in postman everything works great. Using the getAccessToken() function recommended from the documentation works well for the first call in an application. As soon as a second call is done with {bearer $getAcessToken()} “User is not authorised to access this resource”. Once I copy and paste this token that is returned from the second call, I can exit my application and paste it into Curl or postman and it works. Very confused here.

Thanks for help in advance everyone****
Really struggling with this

Do I need to persist the very first getAccessToken() return across a session or something?