#alexanderfarkas_api

1 messages ยท Page 1 of 1 (latest)

vagrant masonBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always 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/1460211490123546635

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

hexed smelt
#

๐Ÿ‘‹ happy to help

#

is this related to your own account or do you mean in a Connect scenario?

signal spade
#

We're a SaaS company and we have an ability to connect people either directly (with their own api key) or via Stripe Connect

#

If they're using a connected version, there is no problem here - we always know their account_id, so it's easy to get an account by it. If they connect directly with an API key, we used to get an account by it - and we're not sure how to do it now

hexed smelt
#

we don't recommend sharing API keys for Connect platforms

#

instead you should connect to that Account and use your connect integration

signal spade
#

I understand, but that's how it was already done

#

thank you for the resource, we will put the migration on the roadmap

#

but I'm wondering whether it possible to bring back the old functionality or no

hexed smelt
#

you cannot retrieve your own account with that API

#

let me see specifically for the Stripe Client if there's another way to do

hexed smelt
signal spade
#

What's interesting I don't see the similar if-check in the Python SDK

hexed smelt
#

oops sorry not sure why I didn't realize you're using python

#

my bad

signal spade
#

No worries, I didn't mention it explicitly

hexed smelt
hexed smelt
#

since id is none by default there won't be an issue of not passing it

signal spade
#

So, ```python
stripe.v1.accounts.retrieve(
None,
options={"api_key": secret_key},
)

should just work?
hexed smelt
#

yes

#

I haven't tested it to be honest

signal spade
#

the link you sent is a global account object (the old way). And the new one (using StripeClient) doesn't have "account" parameter documented as nullable:

 def retrieve(
    self,
    account: str,
    params: Optional["AccountRetrieveParams"] = None,
    options: Optional["RequestOptions"] = None,
) -> "Account"
#

I will give it a try though ๐Ÿ˜„

hexed smelt
#

yes please do

#

I would also try it without any parameters

#

but instead create a new client with the API key

#

and just do .retrieve

signal spade
#

Thank you ๐Ÿ™‚ You can close the ticket