මාධ්යවිකි API උදවු
මෙය ස්වයං-ජනිත මාධ්යවිකි API ප්රලේඛන පිටුවකි.
ප්රලේඛනය සහ උදාහරණ: https://www.mediawiki.org/wiki/API
action=linkaccount (link)
- මෙම ඒකකය සදහා හිමිකම් ලිවීම අවශ්ය වේ.
- මෙම ඒකකය POST ඉල්ලීම් පමණක් බාරගනී.
- Source: MediaWiki
- License: GPL-2.0+
Link an account from a third-party provider to the current user.
The general procedure to use this module is:
- Fetch the fields available from action=query&meta=authmanagerinfo with amirequestsfor=link, and a csrf token from action=query&meta=tokens.
- Present the fields to the user, and obtain their submission.
- Post to this module, supplying linkreturnurl and any relevant fields.
- Check the status in the response.
- If you received PASS or FAIL, you're done. The operation either succeeded or it didn't.
- If you received UI, present the new fields to the user and obtain their submission. Then post to this module with linkcontinue and the relevant fields set, and repeat step 4.
- If you received REDIRECT, direct the user to the redirecttarget and wait for the return to linkreturnurl. Then post to this module with linkcontinue and any fields passed to the return URL, and repeat step 4.
- If you received RESTART, that means the authentication worked but we don't have an linked user account. You might treat this as UI or as FAIL.
- linkrequests
Only use these authentication requests, by the id returned from action=query&meta=authmanagerinfo with amirequestsfor=link or from a previous response from this module.
- වටිනාකම් "|" සමග වෙන් කරන්න. අංක සදහා උපරිම වටිනාකම 50 (500 බොට්ස් සදහා)
- linkmessageformat
Format to use for returning messages.
- එක් වටිනාකමක්: html, wikitext, raw, none
- Default: wikitext
- linkmergerequestfields
Merge field information for all authentication requests into one array.
- Type: boolean (details)
- linkreturnurl
Return URL for third-party authentication flows, must be absolute. Either this or linkcontinue is required.
Upon receiving a REDIRECT response, you will typically open a browser or web view to the specified redirecttarget URL for a third-party authentication flow. When that completes, the third party will send the browser or web view to this URL. You should extract any query or POST parameters from the URL and pass them as a linkcontinue request to this API module.
- linkcontinue
This request is a continuation after an earlier UI or REDIRECT response. Either this or linkreturnurl is required.
- Type: boolean (details)
- linktoken
action=query&meta=tokens මගින් "csrf" සංඥාව සොයාගන්නා ලදී
- මෙම පරාමිතිය අවශ්යයි.
- *
- This module accepts additional parameters depending on the available authentication requests. Use action=query&meta=authmanagerinfo with amirequestsfor=link (or a previous response from this module, if applicable) to determine the requests available and the fields that they use.
- Start the process of linking to an account from Example.
- api.php?action=linkaccount&provider=Example&linkreturnurl=http://example.org/&linktoken=123ABC [open in sandbox]