Telize

ОПЛАЧЕНО
От Frederic Cambus | Обновлено vor 25 Tagen | Location
Популярность

9.8 / 10

Задержка

84ms

Уровень обслуживания

100%

Health Check

N/A

Назад ко всем обсуждениям

Error 401. Not authorized

Rapid account: Kicaweb
kicaweb
vor 8 Jahren

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 vor 8 Jahren

Closing this as the issue was resolved.

Rapid account: Fcambus
fcambus Commented vor 8 Jahren

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.

Присоединяйтесь к обсуждению – добавьте комментарий ниже:

Войдите / Зарегистрируйтесь, чтобы публиковать новые комментарии