hey guys! quick question: for the tap-facebook, do...
# singer-taps
a
hey guys! quick question: for the tap-facebook, do we have a doc to check how to get the
access_token
? it seems like we need an OAuth one, and the one I have been using expires and does not refresh
r
Tap README links to here: https://developers.facebook.com/docs/facebook-login/guides/access-tokens/ I would assume the "App Access Token" is the one you are interested in.
a
Does it expire after 60 days or so? I believe that is by design
a
well actually mine expired after 3 or 4 days
a
In which case you might be using a short-lived token. THere is a separate process to trade this for a longer lived token
a
oh alright thanks Andy! Do you know how I can generate it?
a
I would start with the token debugger and see what it says about your token, whether it is short or long lived. https://developers.facebook.com/docs/audience-network/support/troubleshoot/access-token-debugger/
🙌 1
a
the debugger shows that the token is valid:
but Meltano still returns:
Copy code
[2024-11-06, 00:30:03 UTC] {{ecs.py:225}} INFO - [2024-11-06, 00:29:56 UTC] 2024-11-06T00:29:56.774194Z [info     ] singer_sdk.exceptions.FatalAPIError: 401 Client Error: b'{"error":{"message":"Error validating access token: The session has been invalidated because the user changed their password or Facebook has changed the session for security reasons.","type":"OAuthException","code":190,"error_subcode":460,"fbtrace_id":"ARjaWVE_U_OAWr9T00ofHbe"}}' (Reason: Unauthorized) for path: /v18.0/me/adaccounts cmd_type=elb consumer=False name=tap-facebook producer=True stdio=stderr string_id=tap-facebook
e
@Ayoub Fakir can you try narrowing your stream selection to the ones allowed by the token scopes?
a
@Edgar Ramírez (Arch.dev) thanks a lot for your response!! Actually I just checked our Airflow DAG, and the following streams actually went through:
customaudiences
,
campaigns
,
adlabels
and
ads
so I guess I just need to give a wider access to the token to be able to ingest the rest
1
👍 1