hi im still new to programing so bare with me pls, so everything was working just fine until one day i kept receing invalid api key stauts code 7, i did try it on postman with the same api key and it works but when i try to fecth the api on next js it says the status code 7 dont know if im hitting the rate limit or idk.I know this isnt the best place to ask for tips for like framwokrs and stuff but might as well pls and thank you.
لم تجد الفلم أو المسلسل ؟ سجل دخولك و انشئها
هل تريد تقييم او اضافة هذا العنصر للقائمة؟
لست عضو؟
رد بواسطة robbie3999
بتاريخ أكتوبر 19, 2023 في 4:24 مساءا
Hi @alex-nut82, if your key works in one place and not another, it means there is something wrong with the way you are using it in the second place. You don't have a rate limit problem because that would result in a different status code.
Without more information it is impossible for anyone to determine what is wrong. If you are trying to use the same api URL in both places, then you likely have an error in your code in the second place. My only thought is to try and print (console.log) the URL just before the fetch statement so you can make sure any variables values are what you think they are. For example, if the api key was a variable and was null, that would result in the error you are seeing.