Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rak_stripecli_session_write permission to stripe app key #1213

Open
reesericci opened this issue Jun 29, 2024 · 2 comments
Open

Add rak_stripecli_session_write permission to stripe app key #1213

reesericci opened this issue Jun 29, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@reesericci
Copy link

The more information we have the easier it is for us to help. Feel free to remove any sections that might not apply

Issue

I'm trying to add the rak_stripecli_session_write to my apps' API key to be able to create WebSocket sessions to forward webhooks behind a firewall.

Expected Behavior

I expected to be able to add the permission

Steps to reproduce

Add

{
      "permission": "rak_stripecli_session_write",
      "purpose": "..."
}

to stripe-app.json and run stripe apps upload

Traceback

stripe apps upload

✔ Enter a different version to upload: 0.0.3█
✔ Enter a different version to upload
⬆ You are about to upload your app to Obl.ong

Name:    United
ID:      ci.reeseric.united
Version: 0.0.3

Would you like to proceed: y
✔ Built files for production
✔ Packaged files for upload
× Failed to upload United
Request failed, status=400, body={
  "error": {
    "message": "3:Permission rak_stripecli_session_write does not exist",
    "request_log_url": "https://dashboard.stripe.com/test/logs/req_ECEnlr9wSmMqBz?t=1719673328",
    "type": "invalid_request_error"
  }
}

Yet when creating a session with that API key:

The provided key 'rk_test_*********************************************************************************************' does not have the required permissions for this endpoint on account 'acct_***'. Having the 'rak_stripecli_session_write' permission would allow this request to continue.

Environment

Linux and manual HTTP requests

@reesericci reesericci added the bug Something isn't working label Jun 29, 2024
@reesericci
Copy link
Author

Did some more poking around and realized that I shouldn't add rak_ in apps permissions, so I switched it out for stripecli_session_write but got the same error:

Request failed, status=400, body={
  "error": {
    "message": "3:Permission stripecli_session_write does not exist",
    "request_log_url": "https://dashboard.stripe.com/test/logs/req_xIpfJdZHXkayJF?t=1719697974",
    "type": "invalid_request_error"
  }
}

@reesericci
Copy link
Author

{
  "id": "ci.reeseric.united",
  "version": "0.0.3",
  "name": "United",
  "icon": "./pictures/icon-filled.png",
  "permissions": [
    {
      "permission": "payment_intent_write",
      "purpose": "Checkout"
    },
    {
      "permission": "webhook_write",
      "purpose": "Listen for payment events"
    },
    {
      "permission": "stripecli_session_write",
      "purpose": "Creating WebSocket connection to forward webhooks"
    }
  ],
  "ui_extension": {},
  "stripe_api_access_type": "restricted_api_key",
  "distribution_type": "private"
}

full app.json for reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant