ExchangeSharp
ExchangeSharp copied to clipboard
keys -m create --key-stdin??
Readme.md says I should consult the console app for examples how to do authentication, but the keys option is very light on any detail what I should be passing and in what order (I think public, private keys in that order).
I tried to use --key-stdin and now my console is stuck, whatever I type in it just keeps wanting more lines. Even standard ctrl-c/x keys won't terminate it.
No idea what I'm really supposed to be doing, how I even tell if it's worked. What is the correct usage?
(I got it to work without using --key-stdin but I'd still like to know)
CTRL+Z ends the input editor :) So, the order is as you thought? I'm looking for help setting up the keys file...
I couldn't get the console input working either -- CryptoUtility finds " API key has invalid characters " no matter if I use ^Z on the same line as the keys or the next line after an [Enter]...
Yes, there needs to be more documentation about this. Even the console help doesn't really explain how to do it. I tried using keys -m create --key-stdin, which took it to a prompt. I pasted in my public key, enter, the private key, enter, the passphrase, enter, Ctrl+Z, enter. The Ctrl+Z followed by enter at the end was the only way I could get the prompt to stop. After that it did generate some kind of file, but when I try to use it, an exception is thrown, saying the file should include at least a public key, private key, and optional passphrase.
I got it to work by launching exchange-sharp.exe in interactive mode and creating the file using --key-list instead of --key-stdin. The command (after landing in interactive mode) was keys -m create --key-list public-key,private-key,passphrase. It created a keys.bin file that I was able to load. This is better than having to resort to the LoadAPIKeysUnsecure method.