[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:87](https://github.com/LuanRT/YouTube.js/blob/4729016fb98e7045ee4043857be7eef780c01e35/src/utils/Utils.ts#L87)
