#mancharface - Connect Payout
1 messages ยท Page 1 of 1 (latest)
Okay so you are looking for a file that the system says does not exist.
Right. We received the ReportRun object in response and the URL included in that response, but we can't access it now.
Wondering if it has to do with the api key we're using? It was initiated on behalf of a connected account, so wondering how we can also access the completed report on behalf of the connected account now.
This page only shows a curl request using an api key, but we don't ahve the api key for our connected accounts. https://stripe.com/docs/reports/api#notification-of-report-run-completion
The request you are making to access the request does not include the account the file belongs to
You need to make the GET request on behalf of that account as well
So you're saying it's just (python) a request.get(URL, stripe_account=STRIPE_ACCOUNT_ID)?
Am I understanding right?
I'm saying you need to make the get request with the same account token you used to create it. If that is how you made the POST request to create the file, then you should be able to use the same format to access the file.
Right. We're not sure how to do that. To create the report, we used the python stripe library. stripe.reporting.ReportRun.create(stripe_account='XXXX') The stripe_account was the account_id of the connected account. We'd already set the API key with stripe.api_key prior to this.
That's an API key, but we don't have the API key for the connected account. I'm sure I'm missing something but not sure what.
You can try the Python code snippets we include in these docs: https://stripe.com/docs/connect/authentication
You should never share your secret API keys, as they can be used to do just about anything on your account. Since you shared your key here I strongly recommend you immediately roll your API key (which will create a new key and block the old one) as explained here: https://stripe.com/docs/keys#rolling-keys
That was from your public docs page. That wasn't my key.
Oh wait is that my key? Hahaha I'll change it.
Suck. My bad. I'll change it.
This was very helpful. Thank you for taking the time to send me that link. Should have been able to find that on my own, but I didn't, so thank you.
No worries. Also here's a good example of making CURL requests with the account headers for connect events. :https://stripe.com/docs/api/connected_accounts?lang=curl
Thank you. And to close the loop, I've rolled my key forward.
Great, thanks ๐
Since this is a public forum, we want to keep everyone's accounts secure. Even in test mode
I will, until the day I die, use Stripe for payment processing online.
Happy to hear it! Feel free to come back with any more questions.