Telize

PAID
By Frederic Cambus | Updated hace 15 días | Location
Popularity

9.8 / 10

Latency

83ms

Service Level

100%

Health Check

N/A

Back to All Discussions

Error 401. Not authorized

Rapid account: Kicaweb
kicaweb
8年前

Hi there!

I’m using your app, but when I use the request, I’m getting a 401 error (not authorized). I use the production key (I also tested the test environment with the same error) but I can’t get a successful response.

My code is the following:

response=Unirest\Request::get("https://telizev1.p.mashape.com/geoip?callback=getgeoip",array("XMashapeKey"=>"MyProductionKeyOfMyApplication","Accept"=>"application/json"));printr(response = Unirest\Request::get("https://telize-v1.p.mashape.com/geoip?callback=getgeoip", array( "X-Mashape-Key" => "MyProductionKeyOfMyApplication", "Accept" => "application/json" ) ); print_r(response);

And this is the response:
Unirest\Response Object ( [code] => 401 [raw_body] => [body] => [headers] => Array ( [{“message”] => “Missing Mashape application key. Go to http://docs.mashape.com/api-keys to learn how to get your API application key.”} ) )

But I’m sending the application key correctly (in your example)

Do you know what can be happening?

Thanks for your help!

Rapid account: Fcambus
fcambus Commented 8年前

Closing this as the issue was resolved.

Rapid account: Fcambus
fcambus Commented 8年前

Hello,

Do you also get a 401 error when trying the Curl request example?

For info, it’s also possible to authenticate using URL query parameters as mentioned here : http://docs.mashape.com/auth-settings#query-parameters

In case this authentication method works for you, you can simply call the following URL : https://telize-v1.p.mashape.com/geoip?mashape-key=YourMashapeSecretkey

Regards.

Join in the discussion - add comment below:

Login / Signup to post new comments