Hi I want to use your api but token is needed.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Hi I want to use your api but token is needed.

Erdem Özgür
My question is where is my token and how can i use the token for API calls?
I am getting this error when i https://en.wiktionary.org/w/api.php?action=edit&section=4&format=json&continue= post it
ERROR: 
See https://en.wiktionary.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce&;amp;gt; for notice of API deprecations and breaking changes.

_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|

Re: Hi I want to use your api but token is needed.

Michael Holloway
Hi Erdem,

You'll need to fetch a CSRF token using api.php?action=query&meta=tokens and post it as the "token" parameter in your api.php?action=edit request.  You'll need to fetch a new token in this way for each request to api.php?action=edit.

--mdh



On Thu, Jul 2, 2020 at 1:12 PM Erdem Özgür <[hidden email]> wrote:
My question is where is my token and how can i use the token for API calls?
I am getting this error when i https://en.wiktionary.org/w/api.php?action=edit&section=4&format=json&continue= post it
ERROR: 
See https://en.wiktionary.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at &amp;lt;https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce&;amp;gt; for notice of API deprecations and breaking changes.
_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api

_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api