If you wanna know more about remote doctypes and how to store and use secret tokens, please refer to the official cozy documentation.
If you wanna know more about remote doctypes and how to store and use secret tokens, please refer to the official cozy documentation.
## Add secrets to a remote
As above, you can pass a _{{secret_token}}_ to your remote doctype. In local, you can directly pass it as a request param in _io.cozy.doctypes/org.ecolyo.usage_.
Otherwise, you will have to add it in the shell script _easy-cozy/db-init.sh_ on the server. You can add the following line to the file in order to add the secret in the database :
```
docker-compose exec db curl -X PUT -d "{\"_id\":\"org.ecolyo.dju\",\"token\":\"${API_DATAGRANDLYON_TOKEN}\"}" http://127.0.0.1:5984/secrets%2Fio-cozy-remote-secrets/org.ecolyo.dju
```
Make sure you have the right remote doctype name as \_id.
Then, in the .env file, just add your token variable.