This message was deleted.
# general
b
This message was deleted.
w
Hi @bumpy-match-12594 - can you provide a little more context of what you’re trying to do? Currently it’s not possible to automate that as users need access to their Org Settings in Infracost Cloud that lets them regenerate their tokens and configure other settings.
b
I'm working on a POC that will self-host infracost and I want to automate everything
w
It might help to have a quick zoom call so I can see what the issue is, there are 2 keys involved in self-hosting…
b
Yea I can see that from the docs. There is a step to either register/login. The cli opens a browser tab for infracost auth login but infracost register accepts command line values for name and email. Thr latter is what I need but the cli doesn't take arguments for name and email. That's the missing piece
w
I see your point. The latter is being removed as of v0.10.8 (being released today!),
infracost auth login
is our new way as users asked for a way to regenerate API keys and not have to enter any details at all (e.g. login with GitHub or Google).
b
Hmm does this new version still open a browser page on auth register?
w
yep as there is no other way to auth with github/google AFAIK. I wonder if you need something like an API to generate API keys for many users or orgs? That’s the kind of thing we can look at as part of Infracost Cloud
b
Thanks for the responses. I will have a think and maybe generate it manually for now and put the key in a vault.
w
Sounds good - good luck with the PoC!
b
Cheers
Hi Ali, I managed to resolve the installation problems but now faced with Invalid API key error when I curl http://localhost:4000/status endpoint
.env file in the root directory of cloud-pricing-api is set to contain both the API key I got from infracost auth login and the self generated 32 chars self hosted api key
However, when I curl the graphql endpoint with the auth login api key, I get a valid response. This confirms that the Api key is indeed valid
Is there anything obvious I have missed?