# cookies
Documentation: [Chrome Cookies API](https://developer.chrome.com/docs/extensions/reference/cookies)
A promise-based wrapper for the Chrome `cookies` API.
## Methods
- [getCookie(details)](#getCookie)
- [getAllCookie(details)](#getAllCookie)
- [getAllCookieStores()](#getAllCookieStores)
- [getCookiePartitionKey(details)](#getCookiePartitionKey)
- [removeCookie(details)](#removeCookie)
- [setCookie(details)](#setCookie)
## Events
- [onCookieChanged(callback)](#onCookieChanged)
### getCookie
```
getCookie(details: chrome.cookies.CookieDetails): Promise
```
Retrieves the cookie matching the specified details, or `null` if not found.
### getAllCookie
```
getAllCookie(details?: chrome.cookies.GetAllDetails): Promise
```
Retrieves all cookies that match the given filter details.
### getAllCookieStores
```
getAllCookieStores(): Promise
```
Retrieves all cookie stores accessible to the extension.
### getCookiePartitionKey [MV3]
```
getCookiePartitionKey(details: chrome.cookies.FrameDetails): Promise
```
Retrieves the partition key for the cookie associated with the given frame (Manifest V3 only).
### removeCookie
```
removeCookie(details: chrome.cookies.CookieDetails): Promise
```
Removes the cookie matching the specified details, returning the details of the removed cookie.
### setCookie
```
setCookie(details: chrome.cookies.SetDetails): Promise
```
Sets a cookie with the given details, returning the created cookie or `null` on failure.
### onCookieChanged
```
onCookieChanged(callback: (changeInfo: chrome.cookies.CookieChangeInfo) => void): () => void
```
Adds a listener that triggers when a cookie change event occurs.