Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Official Nexon API

Initiate Mage
Joined
Aug 16, 2014
Messages
3
Reaction score
0
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.

Someone recently showed me the C# implementation:

However, I'm really not used to HTTP-requests, and hence I don't know how to do the cookie-jar part.
 
Initiate Mage
Joined
Jul 15, 2014
Messages
4
Reaction score
2
Someone recently showed me the C# implementation:

However, I'm really not used to HTTP-requests, and hence I don't know how to do the cookie-jar part.

i tried with my super alpha beast go app and got:

Code:
{"d":{"__type":"NexonEU.Portal.Passport.Common.App.Entity.ResultEntity","Result":false,"ResultCode":-100001,"Message":"An error has occurred. Please try again l
ater.","MessageType":"COMMON_MALICIOUS_ACCESS","ReturnURL":"","Data":null,"Accou
nt":{"__type":"NexonEU.Portal.Passport.Common.App.Entity.Account","UserNo":0,"Us
erID":"adasdas","ForumID":null,"Email":null,"Password":"dsadas","BirthDate":"\/D
ate(-62135596800000)\/","FirstName":null,"LastName":null,"Captcha":"","AccessedG
ame":"NexonEU","Gender":null,"Country":null,"Status":null,"VerificationCode":nul
l,"ReturnURL":null,"SecurityA":null,"SecurityQ":0,"AuthResultCode":0,"AuthResult
":false,"IsReceiveNewsLetter":false,"IsPasswordExpired":false,"IsFaceBook":false
,"IsAccessedMobile":false,"IsSaveID":false,"IsAuthenticated":false,"IsSimpleAuth
":false,"IsForumRegistered":false,"IsEmailVerified":true,"IsSecurityAnswerRegist
ered":false}}}

which is obv a failure. so i knew they be adding checks and poop and patched it up with cookie jar, referer and user agent just to be sure and success:

Code:
{"d":{"__type":"NexonEU.Portal.Passport.Common.App.Entity.ResultEntity","Result":false,"ResultCode":110001,"Message":"Your sign in information is not valid. Ple
ase try again.","MessageType":"LOGIN_FAILED","ReturnURL":"","Data":null,"Account
":{"__type":"NexonEU.Portal.Passport.Common.App.Entity.Account","UserNo":0,"User
ID":"adasdas","ForumID":null,"Email":null,"Password":"dsadas","BirthDate":"\/Dat
e(-62135596800000)\/","FirstName":null,"LastName":null,"Captcha":"","AccessedGam
e":"NexonEU","Gender":null,"Country":null,"Status":null,"VerificationCode":null,
"ReturnURL":null,"SecurityA":null,"SecurityQ":0,"AuthResultCode":0,"AuthResult":
false,"IsReceiveNewsLetter":false,"IsPasswordExpired":false,"IsFaceBook":false,"
IsAccessedMobile":false,"IsSaveID":false,"IsAuthenticated":false,"IsSimpleAuth":
false,"IsForumRegistered":false,"IsEmailVerified":true,"IsSecurityAnswerRegister
ed":false}}}

get on my level scrubs

sample cookie jar

Code:
passport.nexoneu.com	FALSE	/	FALSE	0	gafuoiwytorgbvniowjdduyb	.nexoneu.com	TRUE	/	FALSE	0	1nDyHvJz5W8=	
.passport.nexoneu.com	TRUE	/	FALSE	1471476226	__utma	168593184.880767536.1408404163.1408404163.1408404163.1
.passport.nexoneu.com	TRUE	/	FALSE	1408406026	__utmb	168593184.2.10.1408404163
.passport.nexoneu.com	TRUE	/	FALSE	0	168593184	
.passport.nexoneu.com	TRUE	/	FALSE	1424172226	__utmz	168593184.1408404163.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
.nexoneu.com	TRUE	/	FALSE	0	NexonEU	
#HttpOnly_passport.nexoneu.com	FALSE	/	FALSE	0	ASP.NET_SessionId	g1ulxwiwsosbapbx2blioxl5
.nexoneu.com	TRUE	/	FALSE	0	pageLan	1nDyHvJz5W8=

edit: rewritten in elixir bcus im hipster and it still works
 
Initiate Mage
Joined
Aug 16, 2014
Messages
3
Reaction score
0
i tried with my super alpha beast go app and got:

Code:
{"d":{"__type":"NexonEU.Portal.Passport.Common.App.Entity.ResultEntity","Result":false,"ResultCode":-100001,"Message":"An error has occurred. Please try again l
ater.","MessageType":"COMMON_MALICIOUS_ACCESS","ReturnURL":"","Data":null,"Accou
nt":{"__type":"NexonEU.Portal.Passport.Common.App.Entity.Account","UserNo":0,"Us
erID":"adasdas","ForumID":null,"Email":null,"Password":"dsadas","BirthDate":"\/D
ate(-62135596800000)\/","FirstName":null,"LastName":null,"Captcha":"","AccessedG
ame":"NexonEU","Gender":null,"Country":null,"Status":null,"VerificationCode":nul
l,"ReturnURL":null,"SecurityA":null,"SecurityQ":0,"AuthResultCode":0,"AuthResult
":false,"IsReceiveNewsLetter":false,"IsPasswordExpired":false,"IsFaceBook":false
,"IsAccessedMobile":false,"IsSaveID":false,"IsAuthenticated":false,"IsSimpleAuth
":false,"IsForumRegistered":false,"IsEmailVerified":true,"IsSecurityAnswerRegist
ered":false}}}

which is obv a failure. so i knew they be adding checks and poop and patched it up with cookie jar, referer and user agent just to be sure and success:

Code:
{"d":{"__type":"NexonEU.Portal.Passport.Common.App.Entity.ResultEntity","Result":false,"ResultCode":110001,"Message":"Your sign in information is not valid. Ple
ase try again.","MessageType":"LOGIN_FAILED","ReturnURL":"","Data":null,"Account
":{"__type":"NexonEU.Portal.Passport.Common.App.Entity.Account","UserNo":0,"User
ID":"adasdas","ForumID":null,"Email":null,"Password":"dsadas","BirthDate":"\/Dat
e(-62135596800000)\/","FirstName":null,"LastName":null,"Captcha":"","AccessedGam
e":"NexonEU","Gender":null,"Country":null,"Status":null,"VerificationCode":null,
"ReturnURL":null,"SecurityA":null,"SecurityQ":0,"AuthResultCode":0,"AuthResult":
false,"IsReceiveNewsLetter":false,"IsPasswordExpired":false,"IsFaceBook":false,"
IsAccessedMobile":false,"IsSaveID":false,"IsAuthenticated":false,"IsSimpleAuth":
false,"IsForumRegistered":false,"IsEmailVerified":true,"IsSecurityAnswerRegister
ed":false}}}

get on my level scrubs

sample cookie jar

Code:
passport.nexoneu.com    FALSE    /    FALSE    0    gafuoiwytorgbvniowjdduyb    .nexoneu.com    TRUE    /    FALSE    0    1nDyHvJz5W8=    
.passport.nexoneu.com    TRUE    /    FALSE    1471476226    __utma    168593184.880767536.1408404163.1408404163.1408404163.1
.passport.nexoneu.com    TRUE    /    FALSE    1408406026    __utmb    168593184.2.10.1408404163
.passport.nexoneu.com    TRUE    /    FALSE    0    168593184    
.passport.nexoneu.com    TRUE    /    FALSE    1424172226    __utmz    168593184.1408404163.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
.nexoneu.com    TRUE    /    FALSE    0    NexonEU    
#HttpOnly_passport.nexoneu.com    FALSE    /    FALSE    0    ASP.NET_SessionId    g1ulxwiwsosbapbx2blioxl5
.nexoneu.com    TRUE    /    FALSE    0    pageLan    1nDyHvJz5W8=

edit: rewritten in elixir bcus im hipster and it still works

Can you show me a full request-buffer? :)
 
Divine Celestial
Loyal Member
Joined
Sep 29, 2008
Messages
804
Reaction score
219

^ Gateway for third-party devs; used for Nexon Launcher implementation. No longer updated since Splash Damage no longer uses the Nexon API (since it's now a Steam exclusive game).

API Information (may be outdated):

The web API supports Basic authorization and Bearer authorization ( ).
Authorization:
Create Token:
Path: /auth/token
Method: POST
Parameters: ticket, secret_key
Output: token, refresh_token, expires_in, user_params (Optional)
Example Output:
Code:
/* WITHOUT user_params */
{
"token": "Token", 
"refresh_token": "Refresh Token", 
"expires_in": 1000
}
/* WITH user_params */
{
"token": "Token", 
"refresh_token": "Refresh Token", 
"user_no": "1", 
"user_params": {"invoice": "invoice" }
}

Refresh Token:
Path: /auth/token
Method: POST
Parameters: grant_type, refresh_token
Output: token, refresh_token, expires_in
Example Output:
Code:
{
"token": "Token", 
"refresh_token": "Refresh Token", 
"expires_in": 1000
}
User:
Retrieve Profile:
Path: /users/{user_no}/profile
Method: GET
Parameters: access_token, user_no
Output: profile_name, tagline, privacy_level, status, status_code, relation, relation_code, profile_name_history, avatar
Example Output:
Code:
{
"user_no": 1337, 
"profile_name": "Fuckboy", 
"tagline": "duck", 
"privacy_level": 40, 
"status": "Online", 
"status_code": 1,
"relation": "MYSELF", 
"relation_code": 1, 
"profile_name_history": [ "PROFILENAME1", "PROFILENAME2", "PROFILENAME3" ], 
"avatar": { "avatar_id": 10, "avatar_img": "URL", "is_default": false }
}
privacy_level possible outcome:
0Anonymous
10Public
20Friend of Friend
30Friend
40Private
50Product Admin

status/status_code possible outcome:

status_codestatus
0Offline
1Online
2Away
3Busy
80Invisible
99Unknown

Note: To get for current user, use /users/me/profile

Retrieve Profile Name:
Path: /users/{user_no}/profilename
Method: GET
Parameters: user_no
Output: profile_name, is_default
Example Output:
Code:
{
"user_no": 1337, 
"profile_name": "Fuckboy", 
"is_default": false
}

Retrieve User Relation:
Path: /users/{user_no}/relation
Method: GET
Parameters: access_token, user_no
Output: relation_code, relation
Example Output:
Code:
{
"user_no": 1337, 
"relation_code": 1, 
"relation": "MYSELF"
}
relation/relation_code possible outcome:

relation_coderelation
1MYSELF
22FRIEND
23FRIEND_REQUEST_PENDING
24FRIEND_REQUEST_SENT
99NOT_FRIEND

Retrieve Friend List:
Path: /users/{user_no}/friends
Method: GET
Parameters: access_token
Output: friends
Example Output:
Code:
{
"user_no": 1337, 
"friends": { "1338": { "user_no": 1338, "profile_name": "Not a Fuckboy" }, ... }
}
Shop:
Get List of Items in Shop:
Path: /products/{product_id}/shop
Method: GET
Parameters: access_token, product_id
Output: product_id, categories, category_id, shop_items, item_id, item_name, item_price
Example Output:
Code:
{
"product_id": "000000", 
"categories": { "101": { "category_id": "101", "shop_items": { "12356": { "item_id": "12356", "item_name": "Derp", "item_price": "1", "item_status": "1", "item_description": "", "category_id": "101" }, ... } } }
}

List Items in User's Inbox:
Path: /users/me/iteminbox
Method: GET
Parameters: access_token, product_id
Output: item_inbox, order_no, item_id, item_name, order_date
Example Output:
Code:
{
"user_no": 1337, 
"item_inbox": { "1": { "order_no": 1, "item_id": "12356","item_name": "Derp", "order_date": "20150804 01:00:00" }, 
}
}

Confirm Purchase:
Path: /users/me/iteminbox
Method: POST
Parameters: access_token, invoice
Output: item_inbox, order_no, item_id
Example Output:
Code:
{
"user_no": 1337, 
"item_inbox": { "1": { "order_no": 1, "item_id": "12356" }, ... }
}

Get User's NX Balance :
Path: /users/me/nxcash
Method: GET
Parameters: access_token
Output: user_no, nx_prepaid, nx_credit
Example Output:
Code:
{
"user_no": 1337, 
"nx_credit": 999999999,
"nx_prepaid": 999999999,
}

All the API stuff above is in regards to the implementation of a game to Nexon Launcher via the Nexon SDK (which is, of course, outdated by about a year and then some b/c no developer needs it).
Images of Nexon Developer portal (taken from docs):
3ZxcSrM - Nexon API - RaGEZONE Forums
zkYidHb - Nexon API - RaGEZONE Forums
mx3920R - Nexon API - RaGEZONE Forums
P0JdBaM - Nexon API - RaGEZONE Forums
 

Attachments

You must be registered for see attachments list
Last edited:
Back
Top