OAuth access failed for brand account

Viewed 184

OAuth sign in with scopes to get access to youtube fails when brand channel is chosen in consent screen. Works correctly with average main account's youtube channel.

scope: "email profile openid https://www.googleapis.com/auth/youtube"
config: {
  client_id: my_client_id,
  fetch_basic_profile: true,
  ux_mode: 'popup',
  response_type: 'permission',
  access_type: 'offline',
  prompt: 'consent'
}
Request https://accounts.google.com/o/oauth2/iframerpc?action=issueToken&response_type=token%20id_token&login_hint=AJDLj6JUa8yxXrhHdWRHIV0S13cANzW1y8OtI22VrYqaEC2i73av3HLVph3WpN9U_HlWSNxCsiYTB2bXOl1-DWQmT0zrdSxGa1JR03gPm3hk1GCjY9-EQsDI5aEH73UEvOOCoqynaOnr&client_id={my_real_token_here}&origin=http%3A%2F%2Flocalhost%3A4000&scope=openid%20profile%20email&ss_domain=http%3A%2F%2Flocalhost%3A4000

Failed with 403, response - { "error" : "invalid_request" } 
gapi.auth2.getAuthInstance()
    .signIn({ ...config, scope })
    .then(res => {
      const token = res.getAuthResponse().access_token

      return token
    })
    .catch((err) => {
      console.log(err) # {type: "tokenFailed", idpId: "google", error: "server_error"} 

      throw new Error()
    })


0 Answers
Related