Hello everyone,
I need some advice on the QuickBooks tap.
QuickBooks uses OAuth2, where the refresh token gets updated roughly every day. Although this connector has a mechanism to capture the new refresh token when it’s updated, since there’s no write-back capability to the tap and target settings (as far as I understand – see issue #2660), the new refresh token value just gets lost.
I wanted to ask: if someone has experience with this tap, how do you handle this?
The only workaround I can think of is an additional helper script that runs right after the pipeline. This script would fetch the new token from the logs, where it’s stored as plain text (which isn’t ideal, but in this case, it’s useful).
Currently, I’m running Meltano in a container, so what I’m trying now is to:
1. Pack the additional Python script in the same container.
2. Mount the
.env
file with the token.
3. Let the pipeline run, capturing the new token if there is one, and saving it to the log.
4. Have the Python script fetch it as soon as the pipeline is done.
5. Update the value in the
.env
file so the next sync uses the new valid token.
I don’t have a better idea at the moment, apart from forking the connector and modifying the logic there, which I’d prefer to avoid.
Has anyone faced a similar scenario? What do you think of this solution? Any advice or suggestions?
Many thanks in advance!