Originally created by @Riders004 on GitHub (Feb 12, 2025).
Original GitHub issue: https://github.com/imputnet/cobalt/issues/1104
### problem description
How to get JWT tokens
https://github.com/imputnet/cobalt/blob/main/api/src/config.js
Line 39, 40, 41, 42
### your instance configuration
```shell
```
jwtSecret: process.env.JWT_SECRET, there is no value
<!-- gh-comment-id:2652698685 -->
@Riders004 commented on GitHub (Feb 12, 2025):
> https://github.com/imputnet/cobalt/blob/main/docs/run-an-instance.md
>
> https://github.com/imputnet/cobalt/blob/main/docs/protect-an-instance.md
https://github.com/imputnet/cobalt/blob/main/docs/run-an-instance.md#run-cobalt-api-outside-of-docker-useful-for-local-development
See number 5 it's says
add needed environment variables to .env file. only API_URL is required to run cobalt.
But in https://github.com/imputnet/cobalt/blob/main/api/src/config.js line 42
jwtSecret: process.env.JWT_SECRET, there is no value
jwt secret isn’t required to run an instance. for protection measures, such as turnstile + jwt, read the second document
<!-- gh-comment-id:2652700802 -->
@wukko commented on GitHub (Feb 12, 2025):
jwt secret isn’t *required* to run an instance. for protection measures, such as turnstile + jwt, read the second document
jwt secret isn’t required to run an instance. for protection measures, such as turnstile + jwt, read the second document
can I use api.cobalt.tools or cobalt.tools in nodejs project to download audio from youtube ?
<!-- gh-comment-id:2652705745 -->
@Riders004 commented on GitHub (Feb 12, 2025):
> jwt secret isn’t _required_ to run an instance. for protection measures, such as turnstile + jwt, read the second document
can I use api.cobalt.tools or cobalt.tools in nodejs project to download audio from youtube ?
you can generate a random secret with pnpm -r token:jwt or use any other that you like
In 2md doc
Where I want run pnpm -r token:jwt in my phone or pc or where I'm hosting it ?
I run it on termux and get a result
e in 4.84s.
.../0/botto $ pnpm -r token:jwt Scope: all 15 projects
ERR_PNPM_RECURSIVE_RUN_NO_SCRIPT None of the packages has a "token:jwt" script
.../0/botto $
<!-- gh-comment-id:2652710388 -->
@Riders004 commented on GitHub (Feb 12, 2025):
> no, you have to host your own api instance
Ok
you can generate a random secret with pnpm -r token:jwt or use any other that you like
In 2md doc
Where I want run pnpm -r token:jwt in my phone or pc or where I'm hosting it ?
I run it on termux and get a result
e in 4.84s.
.../0/botto $ pnpm -r token:jwt Scope: all 15 projects
ERR_PNPM_RECURSIVE_RUN_NO_SCRIPT None of the packages has a "token:jwt" script
.../0/botto $
you have to run it in cobalt’s api directory, aka where the script is
It's give me but it's saying invalid token
@wukko
<!-- gh-comment-id:2652716295 -->
@Riders004 commented on GitHub (Feb 12, 2025):
you have to run it in cobalt’s api directory, aka where the script is
It's give me but it's saying invalid token

@wukko
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @Riders004 on GitHub (Feb 12, 2025).
Original GitHub issue: https://github.com/imputnet/cobalt/issues/1104
problem description
How to get JWT tokens
https://github.com/imputnet/cobalt/blob/main/api/src/config.js
Line 39, 40, 41, 42
your instance configuration
@wukko commented on GitHub (Feb 12, 2025):
https://github.com/imputnet/cobalt/blob/main/docs/run-an-instance.md
https://github.com/imputnet/cobalt/blob/main/docs/protect-an-instance.md
@Riders004 commented on GitHub (Feb 12, 2025):
https://github.com/imputnet/cobalt/blob/main/docs/run-an-instance.md#run-cobalt-api-outside-of-docker-useful-for-local-development
See number 5 it's says
add needed environment variables to .env file. only API_URL is required to run cobalt.
But in https://github.com/imputnet/cobalt/blob/main/api/src/config.js line 42
jwtSecret: process.env.JWT_SECRET, there is no value
@wukko commented on GitHub (Feb 12, 2025):
jwt secret isn’t required to run an instance. for protection measures, such as turnstile + jwt, read the second document
@Riders004 commented on GitHub (Feb 12, 2025):
can I use api.cobalt.tools or cobalt.tools in nodejs project to download audio from youtube ?
@wukko commented on GitHub (Feb 12, 2025):
no, you have to host your own api instance
@Riders004 commented on GitHub (Feb 12, 2025):
Ok
you can generate a random secret with pnpm -r token:jwt or use any other that you like
In 2md doc
Where I want run pnpm -r token:jwt in my phone or pc or where I'm hosting it ?
I run it on termux and get a result
e in 4.84s.
.../0/botto $ pnpm -r token:jwt Scope: all 15 projects
ERR_PNPM_RECURSIVE_RUN_NO_SCRIPT None of the packages has a "token:jwt" script
.../0/botto $
@wukko commented on GitHub (Feb 12, 2025):
you have to run it in cobalt’s api directory, aka where the script is
@Riders004 commented on GitHub (Feb 12, 2025):
you have to run it in cobalt’s api directory, aka where the script is
It's give me but it's saying invalid token
@wukko