# Auto generation of user api keys for push notification

**URL:** <https://meta.discourse.org/t/auto-generation-of-user-api-keys-for-push-notification/73669>\
**Category:** Development\
**Created:** [Novembro 8, 2017, 8:00am UTC](https://meta.discourse.org/t/auto-generation-of-user-api-keys-for-push-notification/73669 "2017-11-08T08:00:23Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![ayazmaroof](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@ayazmaroof](https://meta.discourse.org/u/ayazmaroof)\
**Post date:** [Novembro 8, 2017, 8:00am UTC](https://meta.discourse.org/t/auto-generation-of-user-api-keys-for-push-notification/73669/1 "2017-11-08T08:00:23Z")

</div>

We are currently working on integrating our discourse forum into our mobile app. I have gone through several topics about whitelisting discourse mobile apps and push notifications.

I understand at this point that users have to Authorize discourse to push notifications by issuing a user api key with a push\_url (as query params) which specifies my custom push notification server.

Since the discourse forum will be integrated in our own app (we are using webview and SSO to show the user our forum), we don’t want users to have to Authorize discourse our own app, especially since they have already logged into our app.  
We are trying to automate the generation of this user api key (with the push\_url) for all users so that we can allow the users to manage the notification permissions in our app.

So my question is: Can I somehow generate user\_api\_keys with the push\_url for each user who logs in without them having to click on the Authorize button?

---

_[View the full topic](https://meta.discourse.org/t/auto-generation-of-user-api-keys-for-push-notification/73669)._
