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 !