# Using userId() as a way to give free credits to our users?

**URL:** <https://forums.creativeclouddeveloper.com/t/using-userid-as-a-way-to-give-free-credits-to-our-users/11639>\
**Category:** UXP Plugin API\
**Created:** [January 10, 2026, 7:56pm UTC](https://forums.creativeclouddeveloper.com/t/using-userid-as-a-way-to-give-free-credits-to-our-users/11639 "2026-01-10T19:56:38Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Karmalakas](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/karmalakas/32/1048_2.png) [@Karmalakas](https://forums.creativeclouddeveloper.com/u/Karmalakas)\
**Post date:** [January 11, 2026, 10:34pm UTC](https://forums.creativeclouddeveloper.com/t/using-userid-as-a-way-to-give-free-credits-to-our-users/11639/2 "2026-01-11T22:34:07Z")

</div>

There’s quite a big reason actually

> [@\[BUG\] \[CRITICAL\] UserInfo.userId() does not always return a value](https://forums.creativeclouddeveloper.com/t/bug-critical-userinfo-userid-does-not-always-return-a-value/9544):
>
> In my index file, right after entrypoints.setup() I perform some checks and it’s using: import { userInfo } from "uxp" const userId = userInfo.userId() Very (and I mean VERY) often userInfo.userId() returns just an empty value. Don’t know if it’s null or undefined or just empty string, but it evaluates to empty string. I spent 3 days debugging this and the only way I could pin point to this, was by adding logging to file and restart Ps a bunch of times (usually up to 10 is enough) to find thi…

Unless you figure out how to get it every time 🤔

---

_[View the full topic](https://forums.creativeclouddeveloper.com/t/using-userid-as-a-way-to-give-free-credits-to-our-users/11639)._
