#Tiago Mestre

1 messages ยท Page 1 of 1 (latest)

oak tuskBOT
mental stump
#

Hi ๐Ÿ‘‹

Are you referring to restricted access keys?

strong plover
#

yes

mental stump
strong plover
#

req_MZnI31roR0KLew

mental stump
#

Did you just create this request?

strong plover
#

yes

#

Couldn't find it in the Stripe api logs, had to capture the error and read the requestId

mental stump
#

Okay, it just takes a little while to show up in our Admin panel so I'm not seeing it yet

#

It's focused on pre-defined roles but it has some info on specific permissions as well

strong plover
#

But this article is for permissions for users within the an account, not sure if it helps with restricted api keys.

#

Another thing, I've never saw this request logged in the Stripe API logs, since it's a connect request not sure if it will appear

mental stump
#

The request ID should be a unique identifier of an API request. It shouldn't matter if it's Connect or not but for some reason I'm not seeing it on my end

#

But the unable to authenticate request message suggests that it wasn't just that you didn't have the correct permissions but that the API could not resolve the key used. Can you share the code you are using to make the request?

strong plover
#

const { stripe_user_id: stripeAccountId } = stripeClient.oauth.token({
grant_type: 'authorization_code',
code,
});

mental stump
#

Sorry for the delay. I'm having trouble tracking down the docs on that particular method

#

What does code represent here?

strong plover
#

The code is the query parameter returned after the user connected their account to ours.

The stripeClient was created in another part of the code

new Stripe(apiSecretKey, { apiVersion: STRIPE_API_VERSION })

#

we are using the stripe NodeJS module

daring star
#

๐Ÿ‘‹ stepping in

#

If I remember correctly, we don't support creating OAuth tokens with restricted keys. But let me double check

#

To clarify, you have all the Connect permissions assigned here for this key?

#

Yeah actually I think this does work if you have the Connect permissions