#alexanderfarkas_api
1 messages ยท Page 1 of 1 (latest)
๐ 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.
๐ happy to help
is this related to your own account or do you mean in a Connect scenario?
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
we don't recommend sharing API keys for Connect platforms
instead you should connect to that Account and use your connect integration
for existing Standard account you can use https://docs.stripe.com/connect/oauth-standard-accounts
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
you cannot retrieve your own account with that API
let me see specifically for the Stripe Client if there's another way to do
actually I stand corrected https://github.com/stripe/stripe-node/blob/master/src/resources/Accounts.ts#L18
you can use the new stripeclient with that method, you just don't need to pass any parameters
What's interesting I don't see the similar if-check in the Python SDK
No worries, I didn't mention it explicitly
I should have identified it from the syntax, my bad again
since id is none by default there won't be an issue of not passing it
So, ```python
stripe.v1.accounts.retrieve(
None,
options={"api_key": secret_key},
)
should just work?
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 ๐
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
Thank you ๐ You can close the ticket