write

open suspend override fun write(content: String): String

Stores the encryption key on TBS via PUT /v1/backup/encrypt-key.

This is used during the backup flow. It sends both the Authorization header (client API key) and the X-Firebase-Token header (Firebase ID token), along with the encryption key in the request body.

On a 401 response, the token is refreshed and the request is retried once.

Return

A confirmation string on success.

Parameters

content

The encryption key to store.

Throws

If the token is unavailable or the TBS request fails.