#max_code

1 messages ¡ Page 1 of 1 (latest)

elfin barnBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1253662411962056717

📝 Have more to share? Add details, code, screenshots, videos, etc. below.

desert quiver
molten tangle
#

I went to the logs and it doesn't show up! here is a picture of the error i'm getting though

#

i got this restricted key not from the dashboard, but from going through the oauth2 flow and then using the refresh token endpoint

elfin barnBOT
desert quiver
molten tangle
#

i'm not using connect, i'm following the oauth instructions for my stripe app

#

req_aN1j5TaQigH5vp is an example of a request i made to get the access token

#

the stripe_user_id = acct_1PTWLvBWS2u8NcV5 matches the account i authenticated with

#

but yes, the resulting key is immediately expired

elfin barnBOT
sour wind
#

Taking over here. Can you share paste the rk_xxx key you're using?

molten tangle
#

rk_test_51PTWLvBWS2u8NcV5hfAZO6GKnwt1yL2cHdT3qZDthAIhUziE8LVMbX6TAutTWnZCQdYak6p0MeQlnFwJtLGt1ZFx00DPCdLchY

#

just refreshed it again:

rk_test_51PTWLvBWS2u8NcV5hfAZO6GKnwt1yL2cHdT3qZDthAIhUziE8LVMbX6TAutTWnZCQdYak6p0MeQlnFwJtLGt1ZFx00DPCdLchY

#

@sour wind any idea what's wrong with the key?

sour wind
#

Can you share an API request that you're making with the key that errors?

molten tangle
#
curl -G https://api.stripe.com/v1/disputes \
  -u "rk_test_51PTWLvBWS2u8NcV5hfAZO6GKnwt1yL2cHdT3qZDthAIhUziE8LVMbX6TAutTWnZCQdYak6p0MeQlnFwJtLGt1ZFx00DPCdLchY:" \
  -d limit=3
{
  "error": {
    "code": "platform_api_key_expired",
    "doc_url": "https://stripe.com/docs/error-codes/platform-api-key-expired",
    "message": "Expired API Key provided: rk_test_*********************************************************************************************CdLchY. Platform access may have been revoked.",
    "type": "invalid_request_error"
  }
}
#

I also tried:

 curl -G https://api.stripe.com/v1/disputes \
  -u "rk_test_51PTWLvBWS2u8NcV5hfAZO6GKnwt1yL2cHdT3qZDthAIhUziE8LVMbX6TAutTWnZCQdYak6p0MeQlnFwJtLGt1ZFx00DPCdLchY:" \
  -d limit=3 -H "Stripe-Livemode: false" -H "Stripe-Account: acct_1PTWLvBWS2u8NcV5"
{
  "error": {
    "code": "platform_api_key_expired",
    "doc_url": "https://stripe.com/docs/error-codes/platform-api-key-expired",
    "message": "Expired API Key provided: rk_test_*********************************************************************************************CdLchY. Platform access may have been revoked.",
    "type": "invalid_request_error"
  }
}
#

(including some more stripe headers)

#

i cant share the req_ id because it's not showing up in any logs

#

is it over for me

sour wind
#

Please be patient, I'm checking on this. It's pretty busy

molten tangle
#

thanks for ur help

sour wind
#

Wait, I think you're using the wrong key in your API requests. You should be passing access_token not refresh_token

#

The refresh token is simply for generating a new access token

molten tangle
#

i am passing the access token

#

refresh token = rt_QKkms2PrExb29J5s4cDTDrgRoGGx75XXJoTQKDKgT7jigBzM

sour wind
#

acct_1PTWLvBWS2u8NcV5 isn't even connected to a platform/app publisher. Likely explains the 'access revoked' error?

molten tangle
#

honestly that's a strange bug, because in the dashboard the app was clearly installed. but i uninstalled/reinstalled (here's the event)

#

now i'm still getting this

curl -G https://api.stripe.com/v1/disputes \
  -u "rk_test_51PTWLvBWS2u8NcV5hfAZO6GKnwt1yL2cHdT3qZDthAIhUziE8LVMbX6TAutTWnZCQdYak6p0MeQlnFwJtLGt1ZFx00DPCdLchY:" \
  -d limit=3 -H "Stripe-Livemode: false" -H "Stripe-Account: acct_1PTWLvBWS2u8NcV5"
{
  "error": {
    "message": "Invalid API Key provided: rk_test_*********************************************************************************************CdLchY",
    "type": "invalid_request_error"
  }
}

but curiously enough two of the error fields disappeared, now it's just saying "Invalid API key provided"

#

ah

#

actually i think that was a mistake on my part

#

i refreshed again and it works now

#

thanks so much for ur help