0

I want to add a parameter in youtube API redirect uri dynamically. I know we can't change the redirect uri dynamically. Is there any way to modify the auth url to add a parameter there and extract it after authentication.

souvik das
  • 77
  • 11

1 Answers1

0

As per the answer in this SO post,

  1. You cannot add anything to the redirect uri, redirect uri is constant as set in the app settings of Oauth. eg :http://www.example.com/redirect.html
  2. To pass several parameters to your redirect uri, have them stored in state parameter before calling Oauth url, the url after authorization will send the same parameters to your redirect uri as state=THE_STATE_PARAMETERS

For further studies, you can check this documentation from YouTube API.

MαπμQμαπkγVπ.0
  • 5,887
  • 1
  • 27
  • 65