St-paywall: PermissionError

Hi, I’m trying to implement paywall using st-paywall in test mode but the problem is that when I assign to the stripe resrticted key permission for customers to “read” and leave the others None, I get an error:

Error:
PermissionError: Request req_TZSNgJfE4izqtu: The provided key 'rk_test_*********************************************************************************************BYBoGA' does not have the required permissions for this endpoint on account 'acct_1AF6F5BDknbCVWX2'. Having the 'rak_subscription_read' permission would allow this request to continue.

Subscription with Stripe - st-paywall i did everything step by step in tutorial, tried to recreate new API restricted key, but nothing worked. Then i created new Stripe account and for the first try it did work, but later after reloading website and clicking log in via google it gave me this error without asking me which google acount i want to sign in. If i change subsciption to read/write it allows me to view the content behind paywall but again without signing up via specific google acc.

I am pretty lost, would appeciate any help! :heart:

Hi @jozi :wave:

Thank you for reporting the issue. I’m sorry to hear you’re experiencing this problem.

I’d like to check if you’ve verified that your Stripe API key, specifically the restricted key, has the required permissions, including rak_subscription_read.

Best wishes,
Charly

Hello Charly,
I followed the documentation Subscription with Stripe - st-paywall, where it is specified that only the customer must have the permission “read”, so should I also set the “subscription” to read and then everything will work as it should?

Thank you in advance
Jozef

so 11. 11. 2023 o 18:39 Charly Wargnier via Streamlit <notifications@streamlit.discoursemail.com> napísal(a):

Looping in @Tyler, who created this excellent component, as he may have encountered the same issue and may be able to assist you here.

Best,
Charly

hey there, I answered this and added a PR here ((Stripe) Error: The provided key does not have the required permissions... · Issue #45 · tylerjrichards/st-paywall · GitHub), let me know if that works for you!

2 Likes

Thanks, Tyler!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.