Adding command line tools support for user api keys


(Vanessasaurus) #21

Thanks @fitz! I can confirm that I can get a token with the helpme client I’m developing - should it be a string on multiple lines that we join by newline or just empty space (to generate one long string)?

Currently, I’m sending the api_username and api_token as part of the body (in data) and the requests that I made previously (using my Dockerized discourse with an admin key) are returning 403, Forbidden. Is your instance expecting a different post type (perhaps in headers or something different?) Or am I not parsing the key from the web interface correctly?

I’m overall wondering how the public key helps in this interaction. I’m guessing that since I’m logged into the discourse instance in my browser, an association is made between my login and the token that is generated? Didn’t we want to do some kind of token generation and/or using a key to sign, encrypt, and send, and then the server decodes?


(fitz) #22

Ok,
We put together a PR here

Hope this helps.


(Vanessasaurus) #23

pusheen-typing Programmer Pusheen, +1!


(Vanessasaurus) #24

Thanks everyone for the enormous effort here! We’ve merged the discourse PR, along with the helpme client (helpme · PyPI) and I’m really excited to get a deployment underway!