#s1nergy
1 messages ยท Page 1 of 1 (latest)
Hello, can you explain your situation a bit more? What webhook are you listening for and what are you doing that cannot access files.stripe.com?
Hello, yes of course. I am trying to listen sigma scheduled query run.created event but in stripe cli i am trying to run this command: curl https://files.stripe.com/v1/files/{{ FILE ID }}/contents -u sk_: I am putting my live key and when I search in browser https://files.stripe.com/v1/files it pops up a window where I put my credentials (that I have in dashboard also) but cant enter there. What is the other way to find my scheduled query file id to put it in cli? And also I cant put host live password in cli
So from what I can see, that URL is intended for you to send a file to programmatically to rather than via logging in in your browser https://stripe.com/docs/file-upload#uploading-a-file
Are you working in the android SDK? If not I can try to find a doc with a coding example in your language of choice
No, I am not working in the Android SDK. Via Python I tried to find the file but there are thousands of them and I don`t know how to filter out scheduled files with results. Is it possible to do that next to this code?
import stripe
stripe.api_key = "sk_live_XXX"
stripe.File.list(limit=30)
But still whenever we find the file, how do I schedule that file in cli when I can`t just put my host password
Have you been following a specific document for this process? I think I am unfamiliar with how this API is typically used in your scenario and seeing that could help me understand
I am using this documentation
I am trying to get that file to schedule it afterwards into the google sheet or MSSQL server. Is it possible ?
Thank you for the doc that was helpful. To take a step back, are you running that curl command in your command line or did you run it somewhere else?
We don't support automatically making a sheet or MYSQL upload but you use custom code can automate one
Does the command successfully run in the CLI?
Command runs successfully but in the end it asks me for the host password and I can`t put any credentials
Can you try hitting enter to just send without a password?
We don't expect one as far as I know
It brings an invalid error
Double checking something one sec...
Oh
Whenever I put enter its not about the password. Its about the content that I have in the url. If I manage to get the file ID I can put that there and maybe then it will move forward
Yes, the command is expecting a valid file ID
It looks like purpose is the field you would use to filter here https://stripe.com/docs/api/files/list#list_files-purpose
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 think our doc assumes you will just get the ID from the webhook that we sent you
but if you want to list them from the API for testing, it looks like you can list your files and filter on purpose='sigma_scheduled_query'
Ok, I will try that
Is it possible to filter out that ID via python?
import stripe
stripe.api_key = "sk_live_XXX
stripe.File.list(limit=30)
How to add purpose here?
The purpose field is automatically set by the system.
Is it possible to filter out that ID via python?
I'm not clear on this question. Can you clarify what you mean here?
By this code as I understand I can list all the files. I just to filter out file id for the sigma_scheduled_query to put it in the Stripe CLI. Maybe I misunderstand something here
Can you try running the list files API call and use purpose='sigma_scheduled_query' to filter? I think that will help clarify this
Basically, sigma_scheduled_query is an entire type of file. When you filter on that purpose, you will get a list of all the files on your account that were created from a sigma scheduled query
Ok, I will try to filter out that in Stripe CLI
Brought this error
"error": {
"message": "Invalid purpose: must be one of account_requirement, additional_verification, business_icon, business_logo, customer_signature, dispute_evidence, document_provider_identity_document, finance_report_run, identity_document, identity_document_downloadable, pci_document, selfie, sigma_scheduled_query, tax_document_user_upload, or terminal_reader_splashscreen",
"param": "purpose",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_ActTY2bZPkfeDj?t=1684766473",
"type": "invalid_request_error"
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
It looks like the equals sign and quotes got passed in as part of the param that you sent
purpose: "='sigma_scheduled_query'",
}``` https://dashboard.stripe.com/test/logs/req_ActTY2bZPkfeDj
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
So the syntax may be slightly different from what you are using
If I am not putting equal sign it brings an error that purpose is an unknown flag
stripe files list --purpose="sigma_scheduled_query" how to write this in Stripe CLI or in python?
I have done it in python
import stripe
stripe.api_key = "sk_live_XXX
stripe.File.list(purpose= "sigma_scheduled_query")
Hello ๐
Stepping in as Pompey had to step away
Can you give me a quick summary on what you're blocked on?
Hi Hanzo
We figured out the half of it with Pompey )))
Now when I have the file id how do I proceed with that to schedule my query. I am having trouble to understand how to listen to Stripe events where I have to put endpoint URL and to choose my sigma.scheduled_query_run.created event
As an endpoint URL what do I put?
the endpoint would be the address where your webhook code is hosted. For example,
https://stripe.com/docs/webhooks
If you're running a local server then the endpoint URL should be something like http://localhost:3000/webhooks
I have this returned when I filter for my file ID
<ListObject list at 0x17d7fbde630> JSON: {
"data": [
{
"created": 1684400894,
"expires_at": null,
"filename": "Monthly_Stripe_Charges_20230517.csv",
"id": "file_1N92okCo0DjamzRAawVtAHYj",
"links": {
"data": [],
"has_more": false,
"object": "list",
"url": "/v1/file_links?file=file_1N92okCo0DjamzRAawVtAHYj"
},
"object": "file",
"purpose": "sigma_scheduled_query",
"size": 3190043,
"title": "Monthly Stripe Charges for 2023-05-17",
"type": "csv",
"url": "https://files.stripe.com/v1/files/file_1N92okCo0DjamzRAawVtAHYj/contents"
}
],
"has_more": false,
"object": "list",
"url": "/v1/files"
From here I took the url as an endpoint
Is it possible to integrate this results from stripe to google sheet (I can specify) or MSSQL?
Ah that's not something our team on discord would know unfortunately.
We're not experts on sigma ๐ฆ
I'd recommend working with our support team as they can put you in touch with team specializing in sigma and can help with granular detail
https://support.stripe.com/?contact=true
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.
Ok, thank you so much Hanzo ))