#S60-Cosminacho
1 messages ยท Page 1 of 1 (latest)
Hello Toby!
Hi there ๐ the second the half of this section shows how to log into the CLI directly with API keys:
https://stripe.com/docs/stripe-cli#login-account
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
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.
"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 get this error in powershell
And can you share what you're doing to make that request?
yes. I am trying to rerun an automation based on that event
Can you share the command that you ran?
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
Ah, looks like you're missing the --live option to make that command run in livemode:
https://stripe.com/docs/cli/events/resend#events_resend-live
how would that request look like ?
stripe events resend evt_3Lnc5OBUHziHdjOs070Vzbw2 --webhook-endpoint=we_1Ll5nqBUHziHdjOsocQBHjw0 --live
like this?
Yup, exactly
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
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).
I will delete all the keys and use the API one then ๐
That should work too.
man it worked!
I feel like a hacker
Hehe, glad to hear that worked!