> ## Documentation Index
> Fetch the complete documentation index at: https://upstash-context7-agent-09df3c1c-9c05-4093-9d6e-e4e2644ee98c-5.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Keys

<Info>
  You can run the async code by importing `AsyncQStash` from `qstash`
  and awaiting the methods.
</Info>

#### Retrieve your signing Keys

```python theme={null}
from qstash import QStash

client = QStash("<QSTASH-TOKEN>")
signing_key = client.signing_key.get()

print(signing_key.current, signing_key.next)
```

#### Rotate your signing Keys

```python theme={null}
from qstash import QStash

client = QStash("<QSTASH-TOKEN>")
new_signing_key = client.signing_key.rotate()

print(new_signing_key.current, new_signing_key.next)
```


## Related topics

- [KEYS](/redis/commands/generic/keys.md)
- [Key-Based Locking](/redis/features/key-locking.md)
- [Roll Your Signing Keys](/qstash/howto/roll-signing-keys.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.