# Create a user in Open Edx from third party website

**URL:** <https://discuss.openedx.org/t/create-a-user-in-open-edx-from-third-party-website/2799>\
**Category:** Site Operations Help\
**Created:** [July 22, 2020, 4:21pm UTC](https://discuss.openedx.org/t/create-a-user-in-open-edx-from-third-party-website/2799 "2020-07-22T16:21:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xperez](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/xperez/32/1089_2.png) [@Xperez](https://discuss.openedx.org/u/Xperez)\
**Post date:** [July 22, 2020, 4:21pm UTC](https://discuss.openedx.org/t/create-a-user-in-open-edx-from-third-party-website/2799/1 "2020-07-22T16:21:00Z")

</div>

Hi 🙂

Can i create/register a user in Open Edx from an external domain? Is this possible? I mean, create it in one click, retrieving data from a form.

I have tested the creation using mysql externally already and it works, but i want something more elegant.

I have seen a post in StackOverflow that recommend using **user\_api/v1/account/registration/** url and a POST method, can anyone confirm this? [Link to the post related](https://stackoverflow.com/questions/37921477/creating-a-user-in-openedx-by-rest-api-or-anything-else-then-traditional-method)

Thanks a lot 🙂

---

<div class="post-metadata">

**Author:** ![johnnyak](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/johnnyak/32/777_2.png) [@johnnyak](https://discuss.openedx.org/u/johnnyak)\
**Post date:** [July 23, 2020, 7:22am UTC](https://discuss.openedx.org/t/create-a-user-in-open-edx-from-third-party-website/2799/2 "2020-07-23T07:22:59Z")

</div>

Hi,

Try the following

Create the applications at: https://lms\_domain\_name/admin/oauth2\_provider/application/

- Client 1:

- Client 2:

**API Endpoints:**

Access Token:

- https://lms\_domain\_name/oauth2/access\_token

- grant\_type=client\_credentials

- client\_id=

- client\_secret=

- token\_type=jwt

User Registration:

- https://lms\_domain\_name/user\_api/v1/account/registration/

- Authorization: Bearer (access token retrieved)

- parameters:

Login

- https://lms\_domain\_name/user\_api/v1/account/login\_session/

- Authorization: Bearer (access token retrieved)

- parameters:

---

<div class="post-metadata">

**Author:** ![johnnyak](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/johnnyak/32/777_2.png) [@johnnyak](https://discuss.openedx.org/u/johnnyak)\
**Post date:** [July 23, 2020, 7:26am UTC](https://discuss.openedx.org/t/create-a-user-in-open-edx-from-third-party-website/2799/3 "2020-07-23T07:26:26Z")

</div>

Also don’t forget to change configuration as follows:

In edx/app/edxapp/lms.env.json file:

“FEATURES” : {  
…  
“ENABLE\_OAUTH2\_PROVIDER”: true,  
“ENABLE\_COMBINED\_LOGIN\_REGISTRATION”: true  
}

---

<div class="post-metadata">

**Author:** ![allen\_luna](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/allen_luna/32/6435_2.png) [@allen\_luna](https://discuss.openedx.org/u/allen_luna)\
**Post date:** [May 16, 2024, 1:28am UTC](https://discuss.openedx.org/t/create-a-user-in-open-edx-from-third-party-website/2799/4 "2024-05-16T01:28:26Z")

</div>

hi @johnnyak

I created my own login system using your instruction, yes it works and push the data

- name
- username
- password
- terms\_of\_service=true
- honor\_code=true
- country=PH
- email

from user admin studio

but I want is after registering it should be auto redirect to learner-dashboard

do you have any suggestion about that ?

the error I encountered

Access to XMLHttpRequest at ‘[https://domain/learner-dashboard/](https://domain/learner-dashboard/)’ (redirected from ‘[https://localhost:44391/Home/Register](https://localhost:44391/Home/Register)’) from origin ‘[https://localhost:44391](https://localhost:44391)’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.Understand this error  
angular.js:14642 Possibly unhandled rejection: {“data”:null,“status”:-1,“config”:{“method”:“POST”,“transformRequest”:[null],“transformResponse”:[null],“jsonpCallbackParam”:“callback”,“url”:“[https://localhost:44391/Home/Register",“data”:{“username”:“juandelacruz”,“email”:“juandelacruz@gmail.com”,“password”:“qwerty”,“name”:"Juan](https://localhost:44391/Home/Register%22,%22data%22:%7B%22username%22:%22juandelacruz%22,%22email%22:%22juandelacruz@gmail.com%22,%22password%22:%22qwerty%22,%22name%22:%22Juan) Dela Cruz”,“language”:“”,“location”:“”},“headers”:{“Content-Type”:“application/json”,“Access-Control-Allow-Methods”:“\*”,“Access-Control-Allow-Credentials”:true,“Accept”:“application/json, text/plain, _/_”}},“statusText”:“”}  
(anonymous) @ angular.js:14642  
(anonymous) @ angular.js:11102  
processChecks @ angular.js:17028  
$digest @ angular.js:18182  
$apply @ angular.js:18480  
done @ angular.js:12501  
completeRequest @ angular.js:12727  
requestError @ angular.js:12665  
error (async)  
(anonymous) @ angular.js:12668  
sendReq @ angular.js:12446  
serverRequest @ angular.js:12198  
processQueue @ angular.js:17000  
(anonymous) @ angular.js:17044  
$digest @ angular.js:18182  
$apply @ angular.js:18480  
(anonymous) @ angular.js:27290  
dispatch @ jquery-3.4.1.js:5237  
elemData.handle @ jquery-3.4.1.js:5044Understand this error  
angular.js:12701

```
   GET https://domain/learner-dashboard/ net::ERR_FAILED

```
