#albaro-reports
1 messages · Page 1 of 1 (latest)
I am back again!
From last time I think we figured it out the URL, right? and you were able to pull the file
I was able to get the object
but for some reason the only way to get the data is looking at it in text form
I want to query the data but it only comes in text form and the csv file I am not being able to find in the object
I looked through all the things that come back with the object and could not figure out
When you retrieve the CSV with a curl, did you actually have a file?
Can you share the latest attempt? code and response if it's Test data
Hi @worldly sparrow I'm taking over this thread
Hi!
Hi! Can you share the request ID (req_xxx)? Here's how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
is it fine if it is for a live report?
Yes, only Stripe engineer can have access to see the request and response data. If you are not comfortable, you can also DM me the request ID.
Thanks, let me take a look
Thank you
If I can access the data as a csv or text file I can make things work. I am only being able to access it as a bunch of strings
This API will return you a file object. If you need to access the file content, you need to download file through url (https://stripe.com/docs/api/files/object?lang=curl#file_object-url) and open a file stream in your application and read the data.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I am not following
I turned the curl call into a request call in Python
and was able to get the data back
but the object with the data only allows me to access it in as a bunch of strings. So not as a data block that I can query
Can you share me the data the you receive from the response?
And you should Stripe Python library instead of making a curl call in your Python code.
How would you like for me to share the data?
I looked through the docs and could not fine a clear example so I ended up turning the curl call into a python call and using request
You can DM to me
https://stripe.com/docs/api/files/retrieve?lang=curl#retrieve_file here's the example code to retrieve a file through Stripe Python SDK,
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I see you have successfully the the file object response, what do you mean by you cannot access anything?
I just dmed you
Show me the code
Just dmed you
You should post the code in this chat so my colleague can easily follow up when I'm not around
I can share again if they need it, I just did not want to post here in case I accidentally have something that could be compromising
Anyway, you are able to access the file download url through results.url . So you should write some Python code to download this file and read its content.