# oauth2\_consumer

Source: https://zotonic.com/docs/2265/oauth2_consumer

URI: https://zotonic.com/id/2265

Language: en



Model for OAuth2 consumer configuration and token access, including consumer lists and per-consumer token retrieval.

Available Model API Paths
-------------------------

| Method | Path pattern                        | Description                                                                      |
| ------ | ----------------------------------- | -------------------------------------------------------------------------------- |
| `get`  | `/consumers`                        | Return admin-only list of all consumer apps with owner, grant type, credential presence, and per-consumer token count. No further lookups. |
| `get`  | `/consumers/list/auth/...`          | Return consumer apps that can be used for OAuth login (`is_use_auth`, non-`client_credentials`, and configured app credentials). |
| `get`  | `/consumers/list/import/...`        | Return consumer apps enabled for import (`is_use_import`), including whether credentials are configured. |
| `get`  | `/consumers/list/...`               | Return consumer apps usable for auth or import, excluding `client_credentials` grant type entries. |
| `get`  | `/consumers/+consumerid/tokens/...` | Return admin-only identity-token rows linked to consumer `+consumerid` (`user_id`, expires, created, modified). |
| `get`  | `/consumers/+consumerid/...`        | Return consumer details for `+consumerid`; admins get full config, non-admins get limited public fields (`id`, `name`, `description`, `domain`). |
| `get`  | `/is_connected/+name/...`           | Return whether current user has an identity key for consumer `+name` (`mod_oauth2` key prefix match); checks presence only, not token validity. |

`/+name` marks a variable path segment. A trailing `/...` means extra path segments are accepted for further lookups.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/2265?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/2265?language=en>)
