Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --raw/-r option to "get token" CLI commands #598

Closed
randomir opened this issue Nov 30, 2023 · 0 comments · Fixed by #678
Closed

Add --raw/-r option to "get token" CLI commands #598

randomir opened this issue Nov 30, 2023 · 0 comments · Fixed by #678

Comments

@randomir
Copy link
Member

Currently, to fetch a specific project's SAPI token (for use in scripting), one can write:

dwave leap project token --project CODE --json | jq .token -r

and then use it like this, for example, to list available solvers:

DWAVE_API_TOKEN=$(dwave leap project token --project CODE --json | jq .token -r) dwave solvers -la

We can simplify the JSON filtering part, though, by introducing --raw/-r option that returns raw token string:

$ dwave leap project token --project CODE --raw
a66...fe

Similarly for dwave auth get <token-type> command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant