for example, when i aceess /movie/popular and click the GET button ,the right side url is like this: http://api.themoviedb.org/3/movie/popular , then i input the api key like this:
api_key : xxxxxxxx
finally,i click the "CallResource" button ,the spinner option is "production", the result is "Invalid API key", but i am sure my key is ok. when i switch the spinner option to "Mock Server", the result is ok. i don't know why?
after,i use the volley lib to access this URL in the android demo and set the header like this:
headers.put("content-type","application/json");
headers.put("api_key", Constans.API_KEY);
then also the response is "401" .
plz help me !
forgive me , my english was so bad :)
Thanks :)
فیلم و نمایش تلویزیونی را نمیتوانید پیدا کنید؟ به سیستم وارد شوید تا آن را ایجاد کنید.
آیا میخواهید به این مورد امتیاز دهید یا به فهرست اضافه کنید؟
عضو نیستید؟
پاسخ توسط a_bin
در تاریخ اوت 20, 2015 ساعت 5:53 ق.ض
what can i input in the Headers ? (apiary.io right side console)
پاسخ توسط Travis Bell
در تاریخ اوت 20, 2015 ساعت 11:26 ق.ض
Hi a_bin,
Apiary by default, expects the api key to be input as a header which we do not support. You will need to pass it in as a query parameter, i.e.:
Cheers.
پاسخ توسط a_bin
در تاریخ اوت 20, 2015 ساعت 10:10 ب.ض
ok, thank u !