# Plex Api - Invite Users via CLI

**URL:** <https://forums.plex.tv/t/plex-api-invite-users-via-cli/222523>\
**Category:** Dev/API Corner\
**Tags:** other-dev\
**Created:** [January 22, 2018, 1:37pm UTC](https://forums.plex.tv/t/plex-api-invite-users-via-cli/222523 "2018-01-22T13:37:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chillihorse](https://avatars.discourse-cdn.com/v4/letter/c/e99b99/32.png) [@chillihorse](https://forums.plex.tv/u/chillihorse)\
**Post date:** [January 22, 2018, 1:37pm UTC](https://forums.plex.tv/t/plex-api-invite-users-via-cli/222523/1 "2018-01-22T13:37:42Z")

</div>

Hey,  
I found this POST Api Command to add users via CLI…

> **[Is there a command line for adding new user or something like that?](https://forums.plex.tv/discussion/221224/is-there-a-command-line-for-adding-new-user-or-something-like-that)**
>
> I want to make an application that make it possible to easy get new user, where they can request access and i can accept with the application. Is there a way to add new plex accounts to a plex serve useing something else than the GUI way in the...

“POST [https://plex.tv/api/home/users?invitedEmail=UserPlexAccountEmail@domain.com](https://plex.tv/api/home/users?invitedEmail=UserPlexAccountEmail@domain.com)”

So I tried…

`
curl -vvv -sfku plexmail:plexpw -X POST https://plex.tv/api/home/users?invitedEmail=NEWINVITATIONMAIL
`

And i get a:  
``

- The requested URL returned error: 403 Forbidden  

Can someone tell my what I’m dong wrong?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [January 8, 2020, 8:06pm UTC](https://forums.plex.tv/t/plex-api-invite-users-via-cli/222523/2 "2020-01-08T20:06:45Z")

</div>


