This is the recommended way to get all your account details for your user, including the web property and View IDs. The
$viewId column contains the ID you need for the data fetching functions such as google_analytics.
ga_account_list(type = c("universal", "ga4", "data"))
Whether to get account summary from universal analytics of GA4 (App_Web) properties
a dataframe of all account, webproperty and view data
Get a summary of all your accounts, web properties and views your authenticated user can see.