#siroos-jafary_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/1443304468375666883
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- siroos-jafary_api, 6 minutes ago, 26 messages
- siroos-jafary_api, 5 days ago, 11 messages
- siroos-jafary_api, 6 days ago, 4 messages
Hi there
Hi, can you please help me resolve this?
Yep. What's your account id?
Is that the account that owns the API keys you're using to make the request? If you're using a sandbox account, then that account
Yes and I'm using test mode not sandbox if that makes any difference?
no that's fine
okay, my colleague solanum told me you're using something called FileMaker - is that still the case?
correct, he identified an extra %22 in my request which I have fixed it already.
I used to get thie erros which is now fixed:
{ "error": { "code": "parameter_unknown", "doc_url": "https://stripe.com/docs/error-codes/parameter-unknown", "message": "Received unknown parameter: query", "param": "query", "request_log_url": "https://dashboard.stripe.com/test/logs/req_VinGIG7zbHeqSi?t=1764180700", "type": "invalid_request_error" }}
but now Im facing this error:
{ "error": { "message": "Invalid API Key provided: 'sk_test*********************QUg7", "type": "invalid_request_error" }}
and this is muy cURL request:
-G --url 'https://api.stripe.com/v1/customers/search' -u 'sk_test_•••QUg7:' -H 'Stripe-Version: 2025-11-17.clover' --data-urlencode query=metadata['appCustomerID']:'320A54B3-7B6C-344B-92C0-1395F8CCCF59'
is this literally the API key you provided to the request, or have you redacted part of the key? 'sk_test*QUg7"
Please don't paste the full unredacted api key into the chat
it is redacted
can you open up a terminal and try the exact same request from the command line?
C:\Windows\System32>curl -G --url 'https://api.stripe.com/v1/customers/search' -u 'sk_test_xxxQUg7:' -H 'Stripe-Version: 2025-11-17.clover' --data-urlencode query=metadata['appCustomerID']:'320A54B3-7B6C-344B-92C0-1395F8CCCF59'
curl: (3) Could not parse the URL, failed to set query
can you try this request to see if it works?
curl https://api.stripe.com/v1/customers
-u "sk_test_id:"
-d name="Jenny Rosen"
--data-urlencode email="jennyrosen@example.com"
C:\Windows\System32>curl --ssl-no-revoke "https://api.stripe.com/v1/customers" ^
More? -u "sk_test_xxxQUg7:" ^
More? -H "Stripe-Version: 2025-11-17.clover" ^
More? -d name="Jenny Rosen" ^
More? --data-urlencode email="jennyrosen@example.com"
{
"id": "cus_TUnLIkt3sZUh2e",
"object": "customer",
"address": null,
"balance": 0,
"created": 1764182851,
"currency": null,
"default_source": null,
"delinquent": false,
"description": null,
"discount": null,
"email": "jennyrosen@example.com",
"invoice_prefix": "V5B3G8CE",
"invoice_settings": {
"custom_fields": null,
"default_payment_method": null,
"footer": null,
"rendering_options": null
},
"livemode": false,
"metadata": {},
"name": "Jenny Rosen",
"next_invoice_sequence": 1,
"phone": null,
"preferred_locales": [],
"shipping": null,
"tax_exempt": "none",
"test_clock": null
}
C:\Windows\System32>
Okay that's good, so the key does work
Ok, lets try something very basic on the Search API endpoint, straight from the docs:
curl -G https://api.stripe.com/v1/customers/search
-u "sk_test_id:"
--data-urlencode query="email:'sally@rocketrides.io'"
you can change the email to something that actually has a result if you want but you should get an empty object and not an error if it succeeds
C:\Windows\System32>curl --ssl-no-revoke -G "https://api.stripe.com/v1/customers/search"^
-u "sk_test_xxxxxQUg7:"^
--data-urlencode query="email:'info@iavenue.ca'"
{
"error": {
"code": "parameter_missing",
"doc_url": "https://stripe.com/docs/error-codes/parameter-missing",
"message": "Missing required param: query.",
"param": "query",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_BIV7XAH6q2URLu?t=1764183499",
"type": "invalid_request_error"
}
}
curl: (3) URL rejected: Bad hostname
C:\Windows\System32>
what in the world. That request works fine for me 🤔
can you remove --ssl-no-revoke and try it exactly as I gave it to you?
Sure, let me try that
This is what I get:
PS C:\WINDOWS\system32> curl -G "https://api.stripe.com/v1/customers/search"
-u "sk_test_xxxxxQUg7:"--data-urlencode query="email:'info@iavenue.ca'"
At line:3 char:4
- --data-urlencode query="email:'info@iavenue.ca'"
- ~
Missing expression after unary operator '--'.
At line:3 char:4 - --data-urlencode query="email:'info@iavenue.ca'"
-
Unexpected token 'data-urlencode' in expression or statement.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : MissingExpressionAfterOperator
PS C:\WINDOWS\system32>
got it working in powershell with below curl:
curl.exe --ssl-no-revoke -G "https://api.stripe.com/v1/customers/search" -u sk_test_xxxxQUg7:
-H "Stripe-Version: 2025-11-17.clover" `
--data-urlencode "query=email:'info@iavenue.ca'"
Sorry I was helping someone else, but I came around to the same answer - I think powershell parses differently
and you can use curl.exe as well as a few different other options, but that seems the easiest
but still not working wit Command Prompt nore FileMaker
C:\Windows\System32>curl --ssl-no-revoke -G "https://api.stripe.com/v1/customers/search" `
{
"error": {
"message": "You did not provide an API key. You need to provide your API key in the Authorization header, using Bearer auth (e.g. 'Authorization: Bearer YOUR_SECRET_KEY'). See https://stripe.com/docs/api#authentication for details, or we can help at https://support.stripe.com/.",
"type": "invalid_request_error"
}
}
curl: (3) URL rejected: Bad hostname
C:\Windows\System32> -u sk_test_OoAyRbgIzOYWJTaSFuUaQUg7: `
'-u' is not recognized as an internal or external command,
operable program or batch file.
C:\Windows\System32> -H "Stripe-Version: 2025-11-17.clover" `
'-H' is not recognized as an internal or external command,
operable program or batch file.
C:\Windows\System32> --data-urlencode "query=email:'info@iavenue.ca'"
Yeah it seems like an issue related to the specific shell you're using
okay, thanks for your help. I'll see what I can do.
try this in command prompt:
curl --ssl-no-revoke -G "https://api.stripe.com/v1/customers/search" -H "Authorization: Bearer sk_test_OoAyRbgIzOYWJTaSFuUaQUg7" -H "Stripe-Version: 2025-11-17.clover" --data-urlencode "query=email:'info@iavenue.ca'"
(that's not a real secret key)
Got it working by moving the query tp the url