79422225

Date: 2025-02-07 21:52:27
Score: 0.5
Natty:
Report link

If you want a connection flow akin to machine-to-machine where there is no human intervention required to authorize the connection every time, I suggest looking into the PKCE flow.

You will authorize your app once (step 1) and then retain the access token, refresh token and access token expiry time. Store those somewhere that can be accessed upon your invoice generation automation running (I personally use a very simple DynamoDB instance) to determine if the current access token is valid or if it's expired. If the current access token is expired then use the refresh token to get a new access token.

You can then use the access token in the Authorization header for all API requests for that session.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Adam DS