
Guide · updated
How to give Grok Bot an API key or password safely
Some jobs need a key or password, like an API key for a service your Bot uses. Grok Bot has a secure way to store these so the value never appears in chat or in ordinary files. Here is how to use it and what to expect afterwards, based on the official help pages.
How do I save a secret safely?
- Ask the Bot to do the job that needs the key. When it needs one, it shows a secure secret card.
- Type or paste the value into the masked field on the card. Don't paste it into the chat message box.
- Choose Save securely. The card changes to Saved and says the value is kept private.
- On a Team Bot you own, you can also click the Bot's name, open Secrets, choose Add secret, and enter a variable name, a short description and the value, then choose Save secret.
- Carry on with your task. The Bot can use the secret, but the value isn't written into the chat.
Questions
Why can't I see the value after saving it?
That's by design. Saved values are write-only and are never shown again, not even in Shell. A blank field later is not proof the secret was deleted.
How do I change a secret?
On a Team Bot, open Secrets and choose Replace next to the name, paste the new value and choose Replace value. You can't read the old value back.
Where should I never put a secret?
In chat, in Shell commands, in ordinary files, or in a demonstration when you use Teach a task. Those places aren't protected the way the secure card is.
Is a Team Bot's secret shared with my team?
It's used in every teammate's chat with that Bot, though they can't see the value. Only add keys you're happy for the whole team to use.
Can the Bot fill a secret into a website?
Yes. If a page asks for it, the card says Filled into the page, and the value is still never shown to the Bot. If it says Could not fill into the page, the page may have changed; submit a new card when asked.
Did updating or resetting the computer delete my secrets?
Secrets saved with the secure card or under Secrets are kept separately. A key you typed into a file or shell profile on the computer can disappear with an update, recover or reset, which is another reason to use the card.
A Team Bot secret name is gone. What should I do?
Fully quit Grok Bot and reopen it, then check on another device. If the list shows an error, choose Try Again first. If the name is missing everywhere, add it again, and never keep a copy in a file. When contacting support, never send the secret value.