API:Account creation/ar

يمكنك إنشاء حسابات عبر استخدام الآبي يمكن أن يكون هذا حسابا جديدا لنفسك، أو يمكنك إنشاء حساب لشخص آخر، مع إرسال كلمة مرور عشوائية إلى هذا الشخص. Account creations are recorded in Special:log/newusers. إذا سجلت الدخول، فسيتم تسجيل اسم المستخدم أيضا عند إنشاء حساب.

This page documents the account creation API as of MediaWiki 1.27. Documentation of the API as it existed in earlier versions is available:

إنشاء حساب
To create an account, a token is required. This token should be fetched using a query.

This action implements an interactive account creation process, which might include CAPTCHAs, interactions with third-party authentication services, two-factor authentication, and more. As such, the specific fields required may vary depending on the configuration of the wiki. A description of the fields needed should be fetched from the query.

مثال بسيط

On a wiki without any special authentication extensions, the fields needed might include username, password , and retype , and optionally email and realname.

Creating an account for someone else
If you're creating an account for someone else, you'll also need to specify a reason. You might also use mailpassword in place of password and retype to have MediaWiki send the new user a temporary password via email.

مثال معقد

On the other hand, a wiki with a CAPTCHA extension, an extension for authentication using OpenID Connect, and a two-factor authentication extension might have a more complicated account creation process process.

The client would be expected to redirect the user's browser to the provided redirecttarget.

The OpenID provider would authenticate, and redirect to Special:OpenIDConnectReturn on the wiki, which would validate the OpenID response and then redirect to the createreturnurl provided in the first POST to the API with the code and state parameters added.

The client gets control of the process back at this point and makes its next API request.

Now the client would prompt the user to set up a new account in their two-factor authentication app and enter the current code, or allow the user to skip 2FA setup. Let's assume the user does set up 2FA.

The account creation has finally succeeded.

If at any point account creation fails, a response with status FAIL will be returned, along with a message to display to the user.

Disable
To disable specifically this API feature, insert the following line in your configuration file:

أنظر أيضا