# CLI Help - doppler configs tokens get/revoke

**URL:** <https://community.doppler.com/t/cli-help-doppler-configs-tokens-get-revoke/1661>\
**Category:** Need Help\
**Created:** [November 1, 2024, 7:16pm UTC](https://community.doppler.com/t/cli-help-doppler-configs-tokens-get-revoke/1661 "2024-11-01T19:16:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![binnsr](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/binnsr/32/1157_2.png) [@binnsr](https://community.doppler.com/u/binnsr)\
**Post date:** [November 1, 2024, 7:16pm UTC](https://community.doppler.com/t/cli-help-doppler-configs-tokens-get-revoke/1661/1 "2024-11-01T19:16:27Z")

</div>

I’m trying to automate a process that will need a service token. Ideally, I don’t want to generate a new one if one already exists that is not expired.  
However, while doing `doppler configs tokens create my-token --plain` successfully generates a token, I’m having get ‘invalid slug’ errors with both ‘get’ and ‘revoke’ subcommands.

```auto
$ doppler configs tokens create doppler-secrets-sync --plain
<REDACTED>
$ doppler configs tokens get doppler-secrets-sync 
Doppler Error: invalid service token slug
$ doppler configs tokens get --slug doppler-secrets-sync 
Doppler Error: invalid service token slug
$ doppler configs tokens revoke doppler-secrets-sync
Unable to delete service token
Doppler Error: Invalid service token.
$

```

Is there a trick that I’m missing here?

---

<div class="post-metadata">

**Author:** ![watsonian](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/watsonian/32/267_2.png) [@watsonian](https://community.doppler.com/u/watsonian)\
**Post date:** [November 1, 2024, 7:39pm UTC](https://community.doppler.com/t/cli-help-doppler-configs-tokens-get-revoke/1661/2 "2024-11-01T19:39:30Z")

</div>

Hi @binnsr!

Welcome to the Doppler Community!

The slug that’s requested there is a UUID that’s returned when you create the token, not the name that you’re passing in. To get the slug, you’d need to not use `--plain` though. That said, the `revoke` command takes _either_ the slug _or_ the token itself, so a token can be used to revoke itself.

Alternately, you can get the slug for the current token using:

```bash
doppler me --json | jq -r '.slug'

```

Does that help at all?

Regards,  
-Joel

---

<div class="post-metadata">

**Author:** ![binnsr](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/binnsr/32/1157_2.png) [@binnsr](https://community.doppler.com/u/binnsr)\
**Post date:** [November 1, 2024, 7:59pm UTC](https://community.doppler.com/t/cli-help-doppler-configs-tokens-get-revoke/1661/3 "2024-11-01T19:59:00Z")

</div>

that helps. Thanks - I need to do some more thinking on my proposed architecture … might be back with more questions 🙂
