#Cindy Lynn-payment_method-401
1 messages · Page 1 of 1 (latest)
Hello!
Do you have a request id (req_123) from a time that this failed?
And to be clear, are you asking if something changed because this was working before?
no I'm not getting a request ID i'm getting an invalid API key. this has not worked in the past, this is a new app.
Also, i'm sure i have a correct API Key
we created a new one also, that was the last advice i got
Can you show me how you are making this call? Is it with one of our libraries?
yes it's with stripe npm module for node
In your code can you log the secret you are setting to make sure it is the one you expect?
Can you make other Stripe API calls?
Yes, I meant API key
Can you tell me what you see if you log the secret key just before you either set it globally or use it for your call?
had to hop on a call i'll come back to this. sorry
No worries
so I pulled up the error that shows the api key that we're sending and in quotes it's adding a curly brace at the end. we do not have a curly brace at the end of ours and we do not have that in our code either.
we were not having this error before we handed the account over to our client. Is it possible there is some permissions settings our client needs to allow for this call?
@timid tree I'm not sure I follow your question and what that means. The { } must come from your own code no?
often it's because it's a bad ruby or other program language interpolation
the curly brace in no where to found in our code. but let me show you what it looks like on my end
like "{api_key}" instead of #{api_key} for example
or that person entered curly brackets around the value
is there a URL I can test this on quickly?
{
"error": {
"message": "Invalid API Key provided: pk_live_************************************************************************************************wzs}",
"type": "invalid_request_error"
}
}
oh ok so it deleted the part i needed you to dsee
"Invalid API Key provided: pk_live_************************************************************************************************wzs}",
wow, it will not allow me to paste it here
but you see the curly brace at the end there
yep that definitely would come from your own code
if you have a live page it's easy to reproduce
on the interpolation are you asking if we have quotes around the value in our docker file?
I can send you to our live page, but you;ll need to use your credit card to reproduce and you're going to see the same thing we do
you will have to click on a featured property and book it for a day. Use Blood mountain i made it $1
its a unix style configuration file that uses key value pairs. no quotes
that URL just doesn't work
Do you have more detailed instructions on how to test this?
sure but that doesn't work for me, maybe you're on a special network? Maybe you have custom dns rules?
okay https://www.go-roam.com/ works, maybe it's mis-configured on their end and you typed the url instead of sharing what you really load?
I have it saved, so no idea on that. youre probably right
ok details on booking
on the home page you'll see featured adventures
yep
okay so if you try and look at the raw source
you'll see the } is right there in the raw JS code
click on the porperty entitled blood mountain
so it comes from your server or wherever the API key is entered
wow!
i keep telling my dev that it has to be coming from us, but hes adamant that it
's not
I mean just try it 🙂
If you go to that page and look at the raw Source it has the } at the end if you search for pk_live you would find it quickly
there's a real key so no I can't
But it's right there in your own app's code and they can find it in Chrome's developer tools
ok thanks
@rich raptor can you please walk me through how you see this because i am at a loss. our api key is in a docker file, so i have no idea how you are seeing it and i can't reproduce what you are doing.
Hello! @rich raptor had to step away, but I'd be happy to help! Let me reproduce and get you some screenshots...
Okay, on https://www.go-roam.com/create-booking if you view the source of the file shown in this screenshot you can see your publishable key (search for pk_live) ends with a } which is not a valid character to have in there.
Does that help? Happy to answer more questions if you have any!
One thing to note is that you can't go directly to https://www.go-roam.com/create-booking, you need to navigate through the site and select an adventure to get there or it won't load the page.
WE FOUND IT!!!! THANK YOU GUYS!!!!!