How to get access to the Web Services API?

Maniaplanet public API, ManiaConnect system and the open source PHP SDK.

Moderator: NADEO

User avatar
gouxim
Nadeo
Nadeo
Posts: 1188
Joined: 14 Jun 2010, 17:20

How to get access to the Web Services API?

Post 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!
Please do not PM for support. Instead, create a thread so that everyone can contribute or benefit from the answer! 8-)
User avatar
m4rcel
Posts: 653
Joined: 15 Jun 2010, 11:12
Contact:

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

Post 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?
ImageImage
Image
User avatar
Chris92
Translator
Translator
Posts: 952
Joined: 15 Jun 2010, 13:22
Location: Vilshofen, Germany
Contact:

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

Post by Chris92 »

Very nice :) Waited for that!
So we could see soon a TM²-Ladder.com? :D
Check out my Personal Twitter account!
User avatar
gouxim
Nadeo
Nadeo
Posts: 1188
Joined: 14 Jun 2010, 17:20

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

Post by gouxim »

m4rcel wrote:(And nice idea with the self-choosable identifier in the API-username :D
:yes:
Please do not PM for support. Instead, create a thread so that everyone can contribute or benefit from the answer! 8-)
User avatar
Jojo_44
Posts: 500
Joined: 12 Jul 2010, 15:58
Location: Germany->Bavaria
Contact:

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

Post 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
Image
my english sounds very unfriendly but it isn´t ;)
User avatar
gouxim
Nadeo
Nadeo
Posts: 1188
Joined: 14 Jun 2010, 17:20

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

Post by gouxim »

Yep the certificate is self-signed for now. We'll buy a trusted certificate.

EDIT: we now have a trusted certificate
Please do not PM for support. Instead, create a thread so that everyone can contribute or benefit from the answer! 8-)
psycodad68
Posts: 1
Joined: 27 Sep 2011, 12:21

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

Post by psycodad68 »

Is there any WSDL i can import? Or is there any descripton of the URL's and FUnctions for the Webservice?
farfa
Nadeo
Nadeo
Posts: 601
Joined: 14 Jun 2010, 16:15
Location: In front of your hood with one lap late

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

Post 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
Also known as: satanasdiabolo
User avatar
Slig
Posts: 640
Joined: 15 Jun 2010, 11:52
Location: TraXicoLand

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

Post 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.
User avatar
m4rcel
Posts: 653
Joined: 15 Jun 2010, 11:12
Contact:

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

Post 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)
ImageImage
Image
Post Reply

Return to “Maniaplanet Web Services”

Who is online

Users browsing this forum: No registered users and 1 guest