简体   繁体   中英

create user in Self sign up API in WSO2 version 6.0

Under Self Sign-up API https://is.docs.wso2.com/en/latest/apis/use-the-self-sign-up-rest-apis/#/ we are calling /me POST API for creating the user and we are getting response as 201 created and we are not getting response like this

{
  "code": "USR-02007",
  "message": "successful user self registration",
  "notificationChannel": "EMAIL"
}

what is going wrong here what is causing issue here?

When you are using the self-registration REST APIs if you wish to get detailed responses add the following config to the <IS-HOME>/repository/conf/deployment.toml file and restart the server. (Responses are enabled based on config in order to support backward compatibility). Anyway, this config should be updated in the REST API docs.

[identity_mgt.user_self_registration]
enable_detailed_api_response = true

If the config is not enabled, there is no response body and the response status code would be 201.

You can add the following configuration to the deployment.toml to enable more detailed self-registration API responses.

[identity_mgt.user_self_registration]
enable_detailed_api_response = true

Also, note that the existing registration pages do not support these API responses. You need to have a custom UI or improve the existing UI to support the new response model. Before trying this configuration, refer to the following docs, since these improvements were done for a more complex use case.

I have written several articles on this use case. Following are some of them.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM