2020-06-04 14:56:45 +00:00
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home ](./index.md ) > [puppeteer ](./puppeteer.md ) > [BrowserContext ](./puppeteer.browsercontext.md ) > [overridePermissions ](./puppeteer.browsercontext.overridepermissions.md )
## BrowserContext.overridePermissions() method
< b > Signature:< / b >
```typescript
overridePermissions(origin: string, permissions: Protocol.Browser.PermissionType[]): Promise< void > ;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
2020-06-23 05:21:01 +00:00
| origin | string | The origin to grant permissions to, e.g. "https://example.com". |
| permissions | Protocol.Browser.PermissionType\[\] | An array of permissions to grant. All permissions that are not listed here will be automatically denied. |
2020-06-04 14:56:45 +00:00
< b > Returns:< / b >
Promise< void>
2020-06-23 05:21:01 +00:00
## Example
```js
const context = browser.defaultBrowserContext();
await context.overridePermissions('https://html5demos.com', ['geolocation']);
```