Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3831

authorization about youtube api v3

$
0
0

I have fully authenticated the request but still the error

export const checkSubscription = id => async (dispatch, getState) => {    try {        const { data } = await request('/subscriptions', {            params: {                part: 'snippet',                forChannelId: id,                mine: true            },            headers: {                Authorization:`Bearer ${getState().auth.accessToken}`            }        })        dispatch({            type: SET_SUBSCRIPTION_STATUS,            payload: data.items.length !== 0        })    } catch (error) {    }}

auth:

 const res = await signInWithPopup(auth, providerGoogle.addScope('https://www.googleapis.com/auth/youtube.force-ssl'))        const accessToken = res.user.accessToken;

error 401:

"errors": [      {"message": "The request uses the \u003ccode\u003emine\u003c/code\u003e parameter but is not properly authorized.","domain": "youtube.parameter","reason": "authorizationRequired","location": "mine","locationType": "parameter"      }    ]  }

I have read the documentation, verified, tested


Viewing all articles
Browse latest Browse all 3831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>