Page 1 of 2

How to get access to the Web Services API?

Posted: 08 Sep 2011, 13:47
by gouxim
Edit: updated documentation available at http://code.google.com/p/maniaplanet-ws ... ingStarted

Hey fellow coders,

The first thing you need to work with the Maniaplanet Web Services is the credentials (username/password). Just like in TMF, you can Manage those credentials on the Maniaplanet Developers website:

https://player.maniaplanet.com/webservices

Connect with your Maniaplanet account and go to "Web Services" to manage your credentials. It should be pretty straightforward.

Once you have created an API user, you can test that it works by calling a service that require authentication. This is the case for retrieving public player information. For example, try to go to the following URL with your browser, and when asked for the username/password enter your newly created API crendentials:

http://ws.maniaplanet.com/players/gouxim/index.txt

Have fun!

Re: How to get access to the Web Services API?

Posted: 08 Sep 2011, 15:16
by m4rcel
Tested it so far and works fine for me. Looking forward to get my hands on the MPWS SDK :thumbsup:
(And nice idea with the self-choosable identifier in the API-username :D )

Btw: Is it intended that the MPWS-subforum does not show up in the forums index?

Re: How to get access to the Web Services API?

Posted: 08 Sep 2011, 16:30
by Chris92
Very nice :) Waited for that!
So we could see soon a TM²-Ladder.com? :D

Re: How to get access to the Web Services API?

Posted: 08 Sep 2011, 16:53
by gouxim
m4rcel wrote:(And nice idea with the self-choosable identifier in the API-username :D
:yes:

Re: How to get access to the Web Services API?

Posted: 08 Sep 2011, 17:13
by Jojo_44
Hi,

first of all again a very nice job. It isn´t self-evident that developers become access to game informations like player data. I know it from other games, unfortunately.

Btw my browser gives me a security warning because the security certificate isn´t trusted anymore.

regards, Jojo

Re: How to get access to the Web Services API?

Posted: 08 Sep 2011, 17:47
by gouxim
Yep the certificate is self-signed for now. We'll buy a trusted certificate.

EDIT: we now have a trusted certificate

Re: How to get access to the Web Services API?

Posted: 27 Sep 2011, 12:32
by psycodad68
Is there any WSDL i can import? Or is there any descripton of the URL's and FUnctions for the Webservice?

Re: How to get access to the Web Services API?

Posted: 27 Sep 2011, 13:46
by farfa
WSDL is for Soap protocol, we decide to use the REST architecture. If you want references of the services, take the API, and look and the methods you will have all the routes we use

Re: How to get access to the Web Services API?

Posted: 28 Sep 2011, 14:44
by Slig
Is \Maniaplanet\WebServices\Dedicated supposed to work actually ?

I get not result, testing both online or offline dedicated logins. Or did i mage a stupid typo error ?

Code: Select all

echo "\n*** Get server info for {$login}\n";
$servers = new \Maniaplanet\WebServices\Dedicated(API_USERNAME, API_PASSWORD);
try {
  $server = $servers->get($login);
  print_r($server);
}
catch(\Maniaplanet\WebServices\Exception $e)  {
  printf("HTTP Response: %d %s\n", $e->getHTTPStatusCode(),$e->getHTTPStatusMessage());
  printf("API Response: %s (%d)\n", $e->getMessage(), $e->getCode());
}
note: exactly the same code, but with 'Players' instead of 'Dedicated', works perfectly.

Re: How to get access to the Web Services API?

Posted: 28 Sep 2011, 14:49
by m4rcel
This bug has already been reported and fixed in the Google-SVN: http://code.google.com/p/maniaplanet-ws ... etail?id=7 ;)

(Maybe also check the Known Issues)