---
title: "Authentication By Cookie"
method: POST
path: "/auth_by_cookie"
tags: ["Authentication"]
---

# Authentication By Cookie

`POST /auth_by_cookie`

## Request

- Base URL: `https://api.folksonomy.openfoodfacts.org`
- URL: `https://api.folksonomy.openfoodfacts.org/auth_by_cookie`
- Auth: none declared

Authentication: provide Open Food Facts session cookie and get a bearer token in return

- **session cookie**: Open Food Facts session cookie

token is returned, to be used in later requests with usual "Authorization: bearer token" headers

## Cookies

- `session` string, nullable

## Response `200`

Successful Response

- TokenResponse
  - `access_token` string, required
  - `token_type` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/openfoodfacts/apis/open-food-facts-folksonomy-rest-api.md) - [All operations](https://skmtc.dev/openfoodfacts/apis/open-food-facts-folksonomy-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/openfoodfacts/apis/open-food-facts-folksonomy-rest-api/revisions/ecf11a0df87a?raw)
