# Adding command line tools support for user api keys

**URL:** <https://meta.discourse.org/t/adding-command-line-tools-support-for-user-api-keys/103803>\
**Category:** Development\
**Created:** [December 6, 2018, 11:21pm UTC](https://meta.discourse.org/t/adding-command-line-tools-support-for-user-api-keys/103803 "2018-12-06T23:21:13Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [December 6, 2018, 11:40pm UTC](https://meta.discourse.org/t/adding-command-line-tools-support-for-user-api-keys/103803/2 "2018-12-06T23:40:43Z")

</div>

I see, I am open to a PR here that makes your use case somewhat easier:

```plaintext
helpme discourse somesite.com
You have no authentication token to somesite.com to create one visit:
http://somesite.com/api_key/new?application_name=helpme&public_key=ABCD&nonce=NONCE&client_id=client_id&auth_redirect... 

```

Then user goes to web browser pastes in URL and at the end of the process INSTEAD of being redirected off site with the encrypted auth token we would simply render the encrypted token on screen.

It means this controller needs to accept another param:

> <https://github.com/discourse/discourse/blob/06d1b19ca2d8994d444ebfa3bb17634a4ae5ea7b/app/controllers/user_api_keys_controller.rb#L11-L11>

And we need another view defined to show the **encrypted** API key that helpme would decrypt.

---

_[View the full topic](https://meta.discourse.org/t/adding-command-line-tools-support-for-user-api-keys/103803)._
