#siroos-jafary_api

1 messages · Page 1 of 1 (latest)

quaint templeBOT
#

👋 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.

sage cape
#

Hi there

iron spade
#

Hi, can you please help me resolve this?

sage cape
#

Yep. What's your account id?

iron spade
#

where do I find my account id?

#

acct_15aqi9KU3WUTPCgH

#

is this the one?

sage cape
#

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

iron spade
#

Yes and I'm using test mode not sandbox if that makes any difference?

sage cape
#

no that's fine

#

okay, my colleague solanum told me you're using something called FileMaker - is that still the case?

iron spade
#

correct, he identified an extra %22 in my request which I have fixed it already.

#

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'

sage cape
#

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

iron spade
#

it is redacted

sage cape
#

can you open up a terminal and try the exact same request from the command line?

iron spade
#

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

sage cape
iron spade
#

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>

sage cape
#

Okay that's good, so the key does work

#

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

iron spade
#

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>

sage cape
#

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?

iron spade
#

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>

iron spade
#

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'"

sage cape
#

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

iron spade
#

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'"

sage cape
#

Yeah it seems like an issue related to the specific shell you're using

iron spade
#

okay, thanks for your help. I'll see what I can do.

sage cape
#

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'"

quaint templeBOT
sage cape
#

(that's not a real secret key)

iron spade
#

Got it working by moving the query tp the url