*** id: ad6a77aa-2f90-4a18-8567-3eebdf66aaa9 title: getDevicesWithPermissions slug: /js/reference/webrtc/get-devices-with-permissions description: getDevicesWithPermissions function in the WebRTC namespace. max-toc-depth: 3 ---------------- ### getDevicesWithPermissions * `Const` **getDevicesWithPermissions**(`kind?`, `fullList?`): `Promise` — See [MediaDeviceInfo](https://developer.mozilla.org/en-US/docs/Web/API/mediadeviceinfo) for more details. Deprecated. Use [getDevices](/docs/browser-sdk/v3/js/reference/webrtc/get-devices) for better cross-browser compatibility. After prompting the user for permission, returns an array of media input and output devices available on this machine. If `kind` is provided, only the devices of the specified kind are returned. Possible values for `kind` are `"camera"`, `"microphone"`, and `"speaker"`, which respectively correspond to [getCameraDevicesWithPermissions](/docs/browser-sdk/v3/js/reference/webrtc/get-camera-devices-with-permissions), [getMicrophoneDevicesWithPermissions](/docs/browser-sdk/v3/js/reference/webrtc/get-microphone-devices-with-permissions), and [getSpeakerDevicesWithPermissions](/docs/browser-sdk/v3/js/reference/webrtc/get-speaker-devices-with-permissions). #### Parameters Filter for this device category. By default, only devices for which we have been granted permissions are returned. Pass `true` to obtain a list of devices regardless of permissions. Note that some values such as `name` and `deviceId` could be omitted. #### Returns `Promise` #### Example ```javascript await SignalWire.WebRTC.getDevicesWithPermissions("camera"); // [ // { // "deviceId": "Rug5Bk...4TMhY=", // "kind": "videoinput", // "label": "HD FaceTime Camera", // "groupId": "Su/dzw...ccfnY=" // } // ] ```