We can use the username and password to get the authentication token and can use the REST APIs of Tableau.
But we can not use the generated token in embed code, is there any other way to bypass that or display restricted sites using token/authentication?
https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_get_started_tutorial_part_2.htm
https://help.tableau.com/current/api/js_api/en-us/JavaScriptAPI/js_api.htm