CheckThatBike Global

FREE
By stolenbikes88 | Updated 5 days ago | Data
Popularity

0.1 / 10

Latency

127,236ms

Service Level

0%

Health Check

N/A

Back to All Discussions

Missing Mashape application key

Rapid account: Richlewis 14
richlewis14
8 years ago

Hi,

I have been trying to get a response from the api using the key generated by Mashape, i have added this api as an application and clicked Get Keys to get my appropriate key

# Ruby
response = Unirest.get "https://stolenbikes88-checkthatbike-global-v1.p.mashape.com/get.json?check=all&frame=WUD092050549E",
headers:{
  "X-Mashape-Key" => ENV['MASHAPE_BIKE_CHECK_KEY'],
  "Accept" => "application/json"
}

Each time i do this i get the message returned โ€œMissing Mashape application keyโ€, is there something wrong with the key generated? or could it be something else? Even if I hardcode the Key i get the same message so itโ€™s not the ENV Var.

Also when test the endpoint within mashape (ruby) i get these errors returned followed by the response

<b>Warning</b>: Invalid argument supplied for foreach() in <b>/srv/users/serverpilot/apps/api/public/endpoints/checkers/stolenbicycleregistry.php</b> on line <b>8</b><br />
<br />
<b>Warning</b>: Cannot modify header information - headers already sent by (output started at /srv/users/serverpilot/apps/api/public/endpoints/checkers/stolenbicycleregistry.php:8) in <b>/srv/users/serverpilot/apps/api/public/api.php</b> on line <b>29</b><br />
<br />
<b>Warning</b>: Cannot modify header information - headers already sent by (output started at /srv/users/serverpilot/apps/api/public/endpoints/checkers/stolenbicycleregistry.php:8) in <b>/srv/users/serverpilot/apps/api/public/api.php</b> on line <b>30</b><br />

{"success":"1","error_number":"","error_message":"","url":"\/get.json?    check=all&frame=WUD092050549E","frame":"WUD092050549E","rating":12.5,"results":[{"checked":"Stolen Bikes UK","checkedURL":"https:\/\/stolen-bikes.co.uk\/?s=WUD092050549E","resultBoolean":1,"runningAddition":2,"message":"Stolen bike(s) found!"},{"checked":"ETA Insurance","iframe":1,"checkedURL":"\/\/checkthatbike.co.uk\/iframes\/general.php?s=WUD092050549E&source=eta","last_updated":  {"updated_human":"19th October 2014","updated_unix":"1413719683"},"resultBoolean":0,"runningAddition":0,"message":"No stolen bikes found!"} , {"checked":"Adhoc Police Data","iframe":1,"checkedURL":"\/\/checkthatbike.co.uk\/iframes\/general.php? s=WUD092050549E&source=adhocpolice","last_updated":{"updated_human":"27th January 2016","updated_unix":"1453856917"},"resultBoolean":1,"runningAddition":2,"message":"Stolen bike(s) found!"},{"checked":"Bike Shepherd","checkedURL":"http:\/\/www.bikeshepherd.org\/global_search?serial=WUD092050549E","resultBoolean":1,"runningAddition":2,"message":"Stolen bike(s) found!"},  {"checked":"Bikesecure","checkedURL":"http:\/\/www.bikesecure.co","resultBoolean":0,"runningAddition":0,"message":"No stolen bikes found!"},{"checked":"Stolen Bristol Bikes","checkedURL":"http:\/\/www.stolenbristolbikes.com\/search?q=WUD092050549E","resultBoolean":0,"runningAddition":0,"message":"No stolen bikes found!"},{"checked":"BikeIndex","checkedURL":"https:\/\/bikeindex.org\/bikes?utf8=%E2%9C%93&query=%23&proximity=Havant+England&proximity_radius=100&stolen=true&non_stolen=&non_proximity=true&serial=WUD092050549E","resultBoolean":1,"runningAddition":2,"message":"Stolen bike(s) found!"},{"checked":"Bike Registry","checkedURL":"http:\/\/www.bikeregistry.com\/stolen-bike.php","resultBoolean":0,"runningAddition":0,"message":"No stolen bikes found!"},{"checked":"Bing","checkedURL":"http:\/\/www.google.com\/search?rls=en&q=%22WUD092050549E%22+bike&ie=UTF-8&oe=UTF-8","resultBoolean":1,"runningAddition":1,"message":"Results found!"},{"checked":"CPIC","checkedURL":"http:\/\/app.cpic-cipc.ca\/English\/searchFormResultsbikes.cfm","resultBoolean":0,"runningAddition":0,"message":"No stolen bikes found!"}]}

Any help appreciated

Thanks

Rapid account: Richlewis 14
richlewis14 Commented 8 years ago

Hi, Thanks again for resolving the error on the demo page. regarding implementation, I have found a way to get a successful response.

Using httparty you can do the following

url='https://stolenbikes88-checkthatbike-global-v1.p.mashape.com/get.json?'
query = { "check" => "all", "frame" => "WUD092050549E" }
headers = {"X-Mashape-Key" => ENV['MASHAPE_BIKE_CHECK_KEY'], "Accept"=>"application/json"}
HTTParty.get(url, :query => query, :headers => headers)
Rapid account: Stolenbikes 88
stolenbikes88 Commented 8 years ago

The warnings where my end and are now resolved (thanks for letting me know), the mashape key Iโ€™m not so sure on sounds like something on the implementation.

If you drop me an email with what you are using it for I could give you direct access.

Rapid account: Richlewis 14
richlewis14 Commented 8 years ago

Hi

Was wondering if there was an update with this please?

Join in the discussion - add comment below:

Login / Signup to post new comments