#S60-Cosminacho

1 messages ยท Page 1 of 1 (latest)

wraith fernBOT
vale pawn
#

Hello Toby!

lunar swift
vale pawn
#

so, I understand I need to get the API keys

#

I am trying to do this as to resend a specific event

#

do I need read or write capabilities for that key ?

#

or permissions

lunar swift
#

I'm not sure I'm following the question. If you use your primary API key then that has full access to everything on your account.

vale pawn
#

"error": {
"code": "resource_missing",
"doc_url": "https://stripe.com/docs/error-codes/resource-missing",
"message": "No such notification: 'evt_3Lnc5OBUHziHdjOs070Vzbw2'; a similar object exists in live mode, but a test mode key was used to make this request.",
"param": "id",
"type": "invalid_request_error"

Learn more about error codes and how to resolve them.

#

I get this error in powershell

lunar swift
#

And can you share what you're doing to make that request?

vale pawn
#

yes. I am trying to rerun an automation based on that event

lunar swift
#

Can you share the command that you ran?

vale pawn
#

PS C:\Users\Cosmin> stripe events resend evt_3Lnc5OBUHziHdjOs070Vzbw2 --webhook-endpoint=we_1Ll5nqBUHziHdjOsocQBHjw0
{
"error": {
"code": "resource_missing",
"doc_url": "https://stripe.com/docs/error-codes/resource-missing",
"message": "No such notification: 'evt_3Lnc5OBUHziHdjOs070Vzbw2'; a similar object exists in live mode, but a test mode key was used to make this request.",
"param": "id",
"type": "invalid_request_error"

#

I can't seem to get in the live mode

lunar swift
vale pawn
#

how would that request look like ?

#

stripe events resend evt_3Lnc5OBUHziHdjOs070Vzbw2 --webhook-endpoint=we_1Ll5nqBUHziHdjOsocQBHjw0 --live

#

like this?

lunar swift
#

Yup, exactly

vale pawn
#

invalid request error

#

"message": "The provided key 'rk_live_*********************************************************************************************zsoWXT' does not have the required permissions for this endpoint on account 'acct_1GxDL7BUHziHdjOs'. Having the 'rak_webhook_write' permission would allow this request to continue.",
"type": "invalid_request_error"
}

#

everything is set to write...but that specific permision I can't find

lunar swift
#

Oh, you're using a restricted key rather than your main API key. In that case, it sounds like the restricted key is missing a permission. Can you double check the settings for the specific restricted key that you're using and ensure it has at least write access for Events (in the All Core Resources section) and write for Webhook Endpoints (in the All Webhook Resources section).

vale pawn
#

I will delete all the keys and use the API one then ๐Ÿ™‚

lunar swift
#

That should work too.

vale pawn
#

man it worked!

I feel like a hacker

lunar swift
#

Hehe, glad to hear that worked!