[youtubei.js](../../../README.md) / [Utils](../README.md) / getRandomUserAgent # Function: getRandomUserAgent() > **getRandomUserAgent**(`type`): `string` Returns a random user agent. ## Parameters • **type**: [`DeviceCategory`](../type-aliases/DeviceCategory.md) mobile | desktop ## Returns `string` ## Defined in [src/utils/Utils.ts:100](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/utils/Utils.ts#L100)