• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Official Nexon API

Everything is possible~
Loyal Member
Joined
Jan 9, 2008
Messages
818
Reaction score
847
Nexon API - reference

This thread is a reference for Nexon's API, got by 'reverse engineering'.


Base URL

They use the following URL for their API:
Code:
http://api.nexon.net/

Methods
All methods use a JSON response format, and require the access_token GET argument (except login).

POST /login

This method is used for logging in and getting the access_token.

POST values:
uid = Username
pw = Password

Response:
return_code (int) = Error code, 0 if it was okay
access_token (string) = The access_token you need for several methods
user_no (int) = Account ID

GET /me

This method is used for getting information of the account, such as e-mail, library and login token.

GET values:
None

Response:
id (int) = Account ID (same as user_no from the login response)
email (string) = Registration e-mail
profile_name (string) = Mine is trendyStep, dafuck?
passport_string (string) = Nexon Auth login token (used for signing in into MapleStory, in the login packet)
library (array) = Probably list of games.


GET /users/{UID}/

This method is used for getting more information of the account, such as username (the original one), login IP, and profile info including tagline and privacy level?

GET values:
None

Response:
user_no (string) = Account ID (same as user_no from the login response)
user_id (string) = Username used at registration
login_ip (string) = IP used when you logged in..?
profile (array) = Info about the profile
-> user_no (int) = Account ID, again
-> profile_name (string) = Profile name, trendyStep?
-> tagline (string) = ?? Empty?
-> privacy_level (int) = Privacy level, 40 standard?
products (array) = Products again


GET /chat/nickname
Gets you your chat nickname... wut

GET values:
None

Response:
nickname (string) = Your nickname
profilename (string) = Your profilename
is_default (bool) = Sometimes true, but then the profilename is "Profile Name"

GET /chat/friendslist
Friends? Wuts dat

GET values:
None

Response:
apiname (string) = API name; friendslist
uid (string) = Account ID
friends (array) = Your friends. Probably none. Like mine...


GET /shop/nxcash

This method shows you the amount of NX cash and such the account has

GET values:
None

Response:
success (array) = Array of success info:
-> code (int) = Error code
-> message (int) = Error message
-> data (array) = Response info data
-> -> user_no (string) = User ID
-> -> nx_credit (int) = Amount of NX credit the user has
-> -> nx_prepaid (int) = Amount of NX prepaid the user has


More to come
 
Last edited:
Joined
Apr 10, 2008
Messages
4,087
Reaction score
1,264
Really nice finding, good job.

Also, I do know Nexon is using the following method to obtain the login auth token when logging in:

Code:
http://www.nexon.net/api/v001/account/login [userID=ragezone&password=ragezone]

-

EDIT: To easily get the values, I made a simple program in C# that gets them using RestSharp client.

Diamondo25 - Nexon API - RaGEZONE Forums


Download:
Click here.
Source Code: Click here.
 
Last edited:
Skilled Illusionist
Joined
Aug 17, 2011
Messages
360
Reaction score
88
So what can this be used for? What applications can be created from this? I understand it gives account data, but that appears to be it.
 
Skilled Illusionist
Joined
Aug 17, 2011
Messages
360
Reaction score
88
This is just something "cool" to mess with. This is what Nexon's using to get data on their website / the auth token for the game. Nothing special.

I see, figured as much, shame it couldn't be put to use in an effective way.
 
Joined
Apr 10, 2008
Messages
4,087
Reaction score
1,264
I see, figured as much, shame it couldn't be put to use in an effective way.

Well, this can be useful if you want to get some data on an account easily by using it's ID and Password (e.x. checking an old account of yours for a certain amount of NX Cash before logging in into the game, checking an old account's email easily, etc...).
 
Junior Spellweaver
Joined
Apr 20, 2013
Messages
103
Reaction score
24
Does anyone happen to know the EMS equivelant?
 
Everything is possible~
Loyal Member
Joined
Jan 9, 2008
Messages
818
Reaction score
847
Last edited:
Initiate Mage
Joined
Aug 16, 2014
Messages
3
Reaction score
0
http://nl.maplestory.nexoneu.com/service/EMSWebService.asmx
http://nl.maplestory.nexoneu.com/common/js/wservice.js

https://passport.nexoneu.com/Service/Authentication.asmx/Login
Uses JSON request: {"account":{"userId":"diamondo25","password":"wwwwwwww","accessedGame":"MapleStory","captcha":"","isSaveID":true}}


Any clue why I receive this response:
Diamondo25 - Nexon API - RaGEZONE Forums


here's my code:

Code:
    std::string nexon_host = "passport.nexoneu.com";
    std::string nexon_uri  = "/Service/Authentication.asmx/Login";

    SOCKET nexon_sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
    
    if (nexon_sock == INVALID_SOCKET)
    {
        return false;
    }

    hostent* host = gethostbyname(nexon_host.c_str());

    sockaddr_in addr;
    addr.sin_family = AF_INET;
    addr.sin_port = htons(80);
    addr.sin_addr.s_addr = *reinterpret_cast<unsigned int*>(host->h_addr);
    std::fill(addr.sin_zero, addr.sin_zero + sizeof(addr.sin_zero), 0);
    
    if (connect(nexon_sock, reinterpret_cast<sockaddr*>(&addr), sizeof(sockaddr_in)) == SOCKET_ERROR)
    {
        std::cout << "Failed to connect to nexon cookie service." << std::endl;
        return false;
    }
    
    std::ostringstream body;
    body << "{\"account\":{\"userId\":\"" << this->username << "\",\"password\":\"" << this->password << "\",";
    body << "\"accessedGame\":\"MapleStory\",\"captcha\":\"\",\"isSaveID\":true}}";
    
    std::ostringstream request;
    request << "POST " << nexon_uri << " HTTP/1.0\r\n";
    request << "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)\r\n";
    request << "Content-Type: application/json\r\n";
    request << "Content-Length: " << body.str().size() << "\r\n";
    request << "Host: " << nexon_host << "\r\n\r\n" << body.str();

    if (send(nexon_sock, request.str().c_str(), request.str().length() + 1, 0) == SOCKET_ERROR)
    {
        std::cout << "Failed to send data to nexon cookie service." << std::endl;
        return false;
    }
    
    std::string response;

    std::size_t bytes_read = 0;
    std::unique_ptr<unsigned char[]> recv_data(new unsigned char[1024]);
    
    while((bytes_read = recv(nexon_sock, reinterpret_cast<char*>(recv_data.get()), 1024, 0)) > 0)
    {
        response.append(recv_data.get(), recv_data.get() + bytes_read);
    }

    shutdown(nexon_sock, SD_BOTH),
    closesocket(nexon_sock);
    
    std::cout.write(response.c_str(), response.length() + 1);
 
Custom Title Activated
Loyal Member
Joined
Nov 14, 2008
Messages
1,025
Reaction score
641
Any clue why I receive this response:
Diamondo25 - Nexon API - RaGEZONE Forums


here's my code:

Code:
    std::string nexon_host = "passport.nexoneu.com";
    std::string nexon_uri  = "/Service/Authentication.asmx/Login";

    SOCKET nexon_sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
    
    if (nexon_sock == INVALID_SOCKET)
    {
        return false;
    }

    hostent* host = gethostbyname(nexon_host.c_str());

    sockaddr_in addr;
    addr.sin_family = AF_INET;
    addr.sin_port = htons(80);
    addr.sin_addr.s_addr = *reinterpret_cast<unsigned int*>(host->h_addr);
    std::fill(addr.sin_zero, addr.sin_zero + sizeof(addr.sin_zero), 0);
    
    if (connect(nexon_sock, reinterpret_cast<sockaddr*>(&addr), sizeof(sockaddr_in)) == SOCKET_ERROR)
    {
        std::cout << "Failed to connect to nexon cookie service." << std::endl;
        return false;
    }
    
    std::ostringstream body;
    body << "{\"account\":{\"userId\":\"" << this->username << "\",\"password\":\"" << this->password << "\",";
    body << "\"accessedGame\":\"MapleStory\",\"captcha\":\"\",\"isSaveID\":true}}";
    
    std::ostringstream request;
    request << "POST " << nexon_uri << " HTTP/1.0\r\n";
    request << "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)\r\n";
    request << "Content-Type: application/json\r\n";
    request << "Content-Length: " << body.str().size() << "\r\n";
    request << "Host: " << nexon_host << "\r\n\r\n" << body.str();

    if (send(nexon_sock, request.str().c_str(), request.str().length() + 1, 0) == SOCKET_ERROR)
    {
        std::cout << "Failed to send data to nexon cookie service." << std::endl;
        return false;
    }
    
    std::string response;

    std::size_t bytes_read = 0;
    std::unique_ptr<unsigned char[]> recv_data(new unsigned char[1024]);
    
    while((bytes_read = recv(nexon_sock, reinterpret_cast<char*>(recv_data.get()), 1024, 0)) > 0)
    {
        response.append(recv_data.get(), recv_data.get() + bytes_read);
    }

    shutdown(nexon_sock, SD_BOTH),
    closesocket(nexon_sock);
    
    std::cout.write(response.c_str(), response.length() + 1);

that code gave me a seizure just from looking at it

write some nice clean groovy code instead
 
Joined
Apr 5, 2008
Messages
663
Reaction score
537
that code gave me a seizure just from looking at it

write some nice clean groovy code instead
Since he's using C++ he probably wants to stick to native code, which means he'd be better off using Rust.
Code:
use std::io::net::tcp::TcpStream;
use std::io::{IoResult, BufferedWriter};
fn do_stuff() -> IoResult<String> {
    let username = "foo";
    let password = "bar";
    let nexon_host = "passport.nexoneu.com";
    let nexon_uri  = "/Service/Authentication.asmx/Login";
    let mut nexon_sock = try!(TcpStream::connect(nexon_host, 80));
    let mut nexon_writer = BufferedWriter::new(nexon_sock.clone());
    let body = format!(r#"{{"account":{{"userId":"{}","password":"{}","accessedGame":"MapleStory","captcha":"","isSaveID":true}}}}"#, username, password);
    try!(write!(nexon_writer, "POST {} HTTP/1.0\r\n", nexon_uri));
    try!(write!(nexon_writer, "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)\r\n"));
    try!(write!(nexon_writer, "Content-Type: application/json\r\n"));
    try!(write!(nexon_writer, "Content-Length: {}\r\n", body.len()));
    try!(write!(nexon_writer, "Host: {}\r\n\r\n{}", nexon_host, body));
    try!(nexon_writer.flush());
    nexon_sock.read_to_string()
}
fn main() {
    println!("{}", do_stuff());
}
Unfortunately I seem to get the same request timeout error.
 
Back
Top