YouTube.js
Guide
Discord
GitHub
Guide
Discord
GitHub

youtubei.js / Utils / getRandomUserAgent

Function: getRandomUserAgent()

getRandomUserAgent(type): string

Returns a random user agent.

Parameters

• type: DeviceCategory

mobile | desktop

Returns

string

Defined in

src/utils/Utils.ts:87

Edit this page
Last Updated:: 3/25/25, 8:08 PM
Contributors: EdamAme-x