Youtube v3 - alternative

부분 유료
분류별 ytdlfree | 업데이트됨 2 mesi fa | Data
인기

9.8 / 10

지연 시간

463ms

서비스 수준

100%

Health Check

100%

모든 토론으로 돌아가기

I can't get response from API endpoint

Rapid account: Telugurunninggamer

Request failed with status code 401
AxiosError: Request failed with status code 401
at settle (http://localhost:3000/static/js/bundle.js:63377:12)
at XMLHttpRequest.onloadend (http://localhost:3000/static/js/bundle.js:62077:66)

	I have modified the snippet like this 
	import axios from "axios";

const URL = “https://youtube-v3-alternative.p.rapidapi.com”;

const options = {
params: {id: ‘dQw4w9WgXcQ’},
headers: {
“X-RapidAPI-Key”: process.env.REACT_APP_RAPID_API_KEY,
“X-RapidAPI-Host”: “youtube-v3-alternative.p.rapidapi.com”,
},
};

export const fetchAPI = async (url) => {
const {data}= await axios.get(${URL}/${url}, options);
console.log(data)
return data
};

Rapid account: Ytdlfree
ytdlfree Commented 10 mesi fa

Looks like the apikey not set properly. Please recheck your code.

아래에 의견을 추가하고 토론에 참여하세요.

새 댓글을 게시하려면 로그인 / 가입