# get_stored_key

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/auth_store/get_stored_key)

Return the stored API key for `provider`, or `None` if unset.

Returns `None` for stored OAuth credentials too — callers that need
OAuth tokens should read `load_credentials()` directly and narrow on
`type`.

## Signature

```python
get_stored_key(
    provider: str,
) -> str | None
```

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/a98f0dfa8d534d8a1885b524632400e52db22ac6/libs/code/deepagents_code/auth_store.py#L321)