I have an account level oauth app. The idea is this app gets webhooks from different accounts.
When I get a webhook I want to use the access token to do something.
In order to do that I need to know which access token to use based on the account id in the webhook.
I have read that the account_id is in the access token JWT - but when I decode the access token it is not there for me.
When I fetch an access token when the code is redirected to me - how do I know which account it is for?
Or, how do I get the account id to be in the access token as Ive seen in other posts?
Is it possible to provide an example of the webhook and token you’re referring to, to make sure we’re on the same page? Our Webhook payloads will include and account ID, but I’m not sure exactly which token you’re referring to.
I’m referring to the access token (Bearer token used in API calls) - I was trying to get the account_id from the token, as I read here:
Where to find the account ID?
Currently I am doing a call to /v2/users/me to get the account_id - but being able to get it from the token would mean I dont need to do that call or include the scope to make the call.
I have the account ID from the webhook.
Ah, I see—thanks for clarifying!
Please see my post here, which walks through how to decode an access token to get an account ID:
Thank you for clarifying, and my sincere apologies for not catching your concern from the onset. I understand now that you’re essentially looking to make this connection with a customer’s Account ID as soon as they authorize/install the app, so that you can then have this record on your end when they uninstall (but please correct me if I’m misunderstanding).
While there’s not a completely straight forward way to track this, there is a suggestion I can make:
When an account author…
Let me know if this helps,
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.