Forum Settings
Forums
New
Aug 15, 2015 4:52 AM
#1
Offline
Jul 2018
564612
Hello everyone,
I'm trying to do a POST request to MAL API in order to add a manga, but after one day trying to do a POST request to API I didn't understand this API I've try to do request with Httpful and with curl. I succes in getting a successful request with both but it didn't add the manga.
So please if someone as a working example of POST request to MAL API in PHP HELP ME !
Reply Disabled for Non-Club Members
Aug 27, 2015 9:03 AM
#2

Offline
Mar 2012
158
Here's a sample using cURL that will add a manga and set a few values:

curl -X "POST" "http://myanimelist.net/api/mangalist/add/1535.xml" --user USERNAME:PASSWORD --data data='{?xml version="1.0" encoding="UTF-8"?}{entry}{volume}1{/volume}{chapter}2{/chapter}{status}1{/status}{date_start}08272015{/date_start}{/entry}'

Or not, as the forum is eating the XML... I'll try a few tricks to see if I can fix it.

The parser here was eating the XML, so I have to change < to { and > to } in the above. Please make sure to switch it back before using it.

Also note that I couldn't get this to work until I used a whitelisted UA, so they might still not have fixed things to allow the official API to work without one.
motokoAug 27, 2015 9:10 AM
Developer, sysadmin, and anime addict.
Have an Android smartphone? Try Atarashii!
Aug 27, 2015 11:37 AM
#3
Offline
Jul 2018
564612
Thanks for the reply. I think that I'm going to wait for the new API.
Aug 27, 2015 10:17 PM
#4

Offline
Mar 2012
158
You're also welcome to try out the PHP-based API I work on. It's much more robust than what MAL offers and is actively maintained and enhanced.

If you'll be low volume, I can whitelist you on my personal server.
Developer, sysadmin, and anime addict.
Have an Android smartphone? Try Atarashii!
Feb 28, 2016 9:32 AM
#5
Offline
Jul 2018
564612
Sorry I just see your answer. If it's still possible, I would like to try your API
Mar 1, 2016 11:14 PM
#6

Offline
Mar 2012
158
Sure. The code is open source, so you can run it on any hosting that supports PHP. You can also use my personal server, with some arrangements.

The code is at https://bitbucket.org/ratan12/atarashii-api. You can PM me if you want to use my server.

I'm also going to PM this message to you so you don't miss it.
Developer, sysadmin, and anime addict.
Have an Android smartphone? Try Atarashii!
Reply Disabled for Non-Club Members

More topics from this board

» Which endpoints support nsfw query param?

crimson-megumin - Apr 21

2 by crimson-megumin »»
9 hours ago

» Cant build the URL

tamcio_ - Dec 4, 2022

4 by Jotzy »»
Yesterday, 4:35 AM

» I made a new anime recommendation system for MyAnimeList

Asudox - Mar 21

4 by Asudox »»
Apr 11, 2:58 PM

» API Rate Limit?

Asudox - Jan 23

7 by pepeefirat »»
Mar 23, 3:57 AM

» Some Animes Missing on API Reponse

Niccol0 - Jan 26

3 by ZeroCrystal »»
Mar 15, 3:44 PM
It’s time to ditch the text file.
Keep track of your anime easily by creating your own list.
Sign Up Login