# Generating User Api Keys with REST API

**URL:** <https://meta.discourse.org/t/generating-user-api-keys-with-rest-api/61916>\
**Category:** Development\
**Tags:** rest-api\
**Created:** [2017 年 5 月 1 日午後 10:55 UTC](https://meta.discourse.org/t/generating-user-api-keys-with-rest-api/61916 "2017-05-01T22:55:27Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Umer\_Mirza](https://avatars.discourse-cdn.com/v4/letter/u/4bbf92/32.png) [@Umer\_Mirza](https://meta.discourse.org/u/Umer_Mirza)\
**Post date:** [2017 年 5 月 1 日午後 10:55 UTC](https://meta.discourse.org/t/generating-user-api-keys-with-rest-api/61916/1 "2017-05-01T22:55:27Z")

</div>

Hi  
I am trying to generate User api keys. I know I can do it from admin dashboard. But instead of there I want to generate by making REST calls. I am following this post [User API keys specification](https://meta.discourse.org/t/user-api-keys-specification/48536)  
I am getting error “THIS PAGE IS PRIVATE OR DOES NOT EXISTS” when I try to make a GET request to this [https://unityforum.discoursehosting.net/api\_key/generate?redirect\_url=www.google.com.pk&client\_id=2&access\_level=read](https://unityforum.discoursehosting.net/api_key/generate?redirect_url=www.google.com.pk&client_id=2&access_level=read)

Can someone please show me how my url should look like with the paramters. I am also confused what exactly is client\_id here? Is it the id of the user whose api needs to created or is the username? Also can I use any url as redirect\_url? For the record I have added this redirect url in my admin settings.

---

_[View the full topic](https://meta.discourse.org/t/generating-user-api-keys-with-rest-api/61916)._
