Home docs 3ds NASC
Post

NASC

This is the authentication server of the 3DS. It uses the same codebase as the NAS and NASWII servers for the Nintendo DS(i) and the Wii. Out of all of the original NAS/NASWII endpoints, only two are known to still exist: ac and pr. Other requests are redirected to http://www.nintendo.com.

General

Main server: https://nasc.nintendowifi.net

Other servers:

  • https://nasc.test.nintendowifi.net
  • https://nasc.dev.nintendowifi.net

The common client certificate (ctr-common-1) is required to access these servers. If it is not provided, the server rejects the TLS handshake.

All form values are encoded with a custom base64 character set, where +/= are replaced by .-* respectively. This applies to both the request and the response.

Headers

HeaderDescription
Hostnasc.nintendowifi.net
X-GameIdThe current game id (%08X)
User-AgentCTR FPD/%04X (see FPD version)
Content-Typeapplication/x-www-form-urlencoded
Content-Typeapplication/x-www-form-urlencoded
Content-LengthContent length

Note that the Content-Type header is included twice.

FPD Version

System versionFPD version
11.15.015
11.16.016

Actions (ac)

This endpoint executes an action based on the type of request.

The type of request is specified by the action parameter. Other parameters depend on the type of action. The action name is case insensitive.

Base Request

The following parameters are always set on a request:

ParamDescription
gameidGame server id (%08X). This is the same as the X-GameId header.
sdkverMajor and minor SDK version (%03d%03d). Always 000000.
titleidTitle id (%016X)
gamecdProduct code, e.g. AMKP for Mario Kart 7
gameverTitle version (%04X)
mediatype0=System, 1=Digital, 2=Cartridge
romidRom id, only present if the media type is 2
makercdProduct maker code (company code)
unitcdUnit code (0=NDS, 1=Wii, 2=3DS)
macadrMAC address of the 3DS
bssidBSSID of active wifi network
apinfoInformation about the used Wi-Fi access point in the format AA:BBBBBBBBBB. Example 01:0000000000. AA is the AP slot. BBBBBBBBBB comes from either ACU_GetNZoneApNumService or ACU_GetConnectingHotspotSubset based on the result from ACU_GetWifiStatus
fcdcertSee LocalFriendCodeSeed_B
devnameDevice name (UTF-16-LE)
servertypeEnvironment (L1 for production)
fpdverFPD version (%04X). This is also included in the user agent.
devtimeCurrent device time (%y%m%d%H%M%S)
langLanguage code (%02X)
regionRegion code (%02X)
csnumSerial number

Then, either:

ParamDescription
uidhmacPID HMAC, received during account creation
useridPID, received during account creation

or:

ParamDescription
passwdPassword for new account

LOGIN

This action provides the location of the game server and a token.

ParamDescription
actionLOGIN
ingamesnNickname provided by game (usually empty)

On success, the server sends the following response:

FieldDescription
locatorHost and port of game server
retryAlways 0
returncdAlways 001 (success)
tokenToken for logging in on game server
datetimeCurrent server time (%Y%m%d%H%M%S)

SVCLOC

This action provides a token for the service and its location.

ParamDescription
actionSVCLOC
keyhashKey hash. Similar to client_id for service tokens on Wii U?
svcService request type

On success, the server sends the following response:

FieldDescription
retryAlways 0
returncdAlways 007 (success)
servicetokenToken for logging in on service
svchostHost of target service
datetimeCurrent server time (%Y%m%d%H%M%S)

Service Request Type

The server response changes with this value:

ValueDescription
0000The svchost is populated as n/a
9001The svchost is populated as dls1.nintendowifi.net. This is likely a remnant from the original NAS/NASWII servers

nzchk

The purpose of this action is unknown, but it’s possibly related to Nintendo Zone.

It doesn’t include any additional parameters, and on success, the server sends the following response:

FieldDescription
retryAlways 0
returncdAlways 009 (success)
datetimeCurrent server time (%Y%m%d%H%M%S)

Profanity (pr)

This endpoint was originally used on NAS/NASWII to check for profanity words, but this functionality seems to be stubbed now.

FieldDescription
wordsList of words to check delimited by tabs \t

On success, the server sends the following response:

FieldDescription
prwordsStubbed to always one 0
returncdAlways 000 (success)
datetimeCurrent server time (%Y%m%d%H%M%S)

Errors

On error, the server sends the following response:

FieldDescription
retry0 or 1
returncdError code (see below)
datetimeCurrent server time (%Y%m%d%H%M%S)

Sometimes, returncd is set to null instead of an error code.

Known Errors

CodeDescription
001Success
101Game server is under maintenance
102Device is banned
107Product code is invalid
109Missing or malformed parameter in request
110Game server is no longer available
112SVC is invalid
119FPD version is invalid
120Title version is invalid
121Device certificate is invalid
122PID HMAC is invalid
123Rom id is banned
125Game id is invalid
127Key hash is invalid

Examples

LOGIN request:

1
2
3
4
5
6
7
8
9
POST /ac HTTP/1.1
Host: nasc.nintendowifi.net
X-GameId: 00030600
User-Agent: CTR FPD/000F
Content-Type: application/x-www-form-urlencoded
Content-Type: application/x-www-form-urlencoded
Content-Length: 876

gameid=MDAwMzA2MDA%2A&sdkver=MDAwMDAw&titleid=MDAwNDAwMDAwMDAzMDcwMA%2A%2A&gamecd=QU1LUA%2A%2A&gamever=MDAwMQ%2A%2A&mediatype=Mg%2A%2A&romid=KJJ3Tnsrdw0qZH0UZQX-VDg%2A&makercd=MDE%2A&unitcd=Mg%2A%2A&macadr=MDQxZDY3ZWQ4YmYw&bssid=NmM4ODUwYzJiYTdh&apinfo=MDE6MDAwMDAwMDAwMA%2A%2A&fcdcert=eGKuWyeaY08jt6Z8T9VzJKRtVk3k212--NVn1UmjsSMKDLzyEC0PvOIM6qVpKNQq3qcVvtlX542KrzTZ5UdxqZiCkaAMEZ0r8y5ygU8F-NBmFo30JFMHWz-JvQWzbNMBXYncbSayAbREdf9CjGOFp1sUGEpu-OCkbOPHyqgCloGo9iIWVIMzNzapjhuNsZSv3bPMkcXyf8KvLwAk-831y4JfPlu4DZKrCR3KNYt.jzZ-MGZFXSiElFSlCinlCnmpJR7UWvYHJOjxAAu0W9ShlbymJOPuTQJB-PzpVouSrQ3lcq7lQexJQ7l1znK1IoVssn0.XDCzDAPtCG9piIam6wAAAAAAAAAAIPX9AQAAAAA%2A&devname=aABlAGwAbABvAHcAbwByAGwAZAA%2A&servertype=TDE%2A&fpdver=MDAwRg%2A%2A&devtime=MTgwNjIzMjEwMTQ1&lang=MDM%2A&region=MDI%2A&csnum=Q0VGMTEwNTQ2OTI%2A&uidhmac=ZThhMmE5MWU%2A&userid=MTAwMDg5NDY0&action=TE9HSU4%2A&ingamesn=

LOGIN response:

1
2
3
4
5
6
7
8
9
HTTP/1.1 200 OK
NODE: pd42wfiap02
Content-Type: text/plain;charset=ISO-8859-1
Content-Length: 248
Date: Tue, 18 Jan 2022 10:50:37 GMT
Server: Nintendo Wii (http)
Connection: keep-alive

locator=MzUuMTYzLjIuODk6NDA0NjA*&retry=MA**&returncd=MDAx&token=CJyBSE-auxaKzdxCnvLJoRicRYB0OnFLoA1wk7Kc34yHTItFZRx.44-DvizdksgEZf-BRyqNeHtUkjqzR3b69XftWqNdg7mZDg-P2rz0jqTTkujbTXwEXsDuqnYx30K2DrcY97F7m52HXBiJCCKnmQ**&datetime=MjAyMjAxMTgxMDUwMzc*

SVCLOC request:

1
2
3
4
5
6
7
8
9
POST /ac HTTP/1.1
Host: nasc.nintendowifi.net
X-GameId: 00081100
User-Agent: CTR FPD/0010
Content-Type: application/x-www-form-urlencoded
Content-Type: application/x-www-form-urlencoded
Content-Length: 871

gameid=MDAwODExMDA%2A&sdkver=MDAwMDAw&titleid=MDAwNDAwMDAwMDA4QTgwMA%2A%2A&gamecd=SkNSUA%2A%2A&gamever=MDAwMQ%2A%2A&mediatype=MQ%2A%2A&makercd=WEM%2A&unitcd=Mg%2A%2A&macadr=MDQxZDY3ZWQ4YmYw&bssid=NmM4ODUwYzJiYTdh&apinfo=MDI6MDAwMDAwMDAwMA%2A%2A&fcdcert=eGKuWyeaY08jt6Z8T9VzJKRtVk3k212--NVn1UmjsSMKDLzyEC0PvOIM6qVpKNQq3qcVvtlX542KrzTZ5UdxqZiCkaAMEZ0r8y5ygU8F-NBmFo30JFMHWz-JvQWzbNMBXYncbSayAbREdf9CjGOFp1sUGEpu-OCkbOPHyqgCloGo9iIWVIMzNzapjhuNsZSv3bPMkcXyf8KvLwAk-831y4JfPlu4DZKrCR3KNYt.jzZ-MGZFXSiElFSlCinlCnmpJR7UWvYHJOjxAAu0W9ShlbymJOPuTQJB-PzpVouSrQ3lcq7lQexJQ7l1znK1IoVssn0.XDCzDAPtCG9piIam6wAAAAAAAAAAIPX9AQAAAAA%2A&devname=aABlAGwAbABvAHcAbwByAGwAZAA%2A&servertype=TDE%2A&fpdver=MDAxMA%2A%2A&devtime=MjQwMjA5MTIxNTUx&lang=MDU%2A&region=MDI%2A&csnum=Q0VGMTEwNTQ2OTI%2A&uidhmac=ZThhMmE5MWU%2A&userid=MTAwMDg5NDY0&action=U1ZDTE9D&keyhash=ZjhiMGUzN2I%2A&svc=MDAwMA%2A%2A

SVCLOC response:

1
2
3
4
5
6
7
8
9
HTTP/1.1 200 OK
Date: Fri, 09 Feb 2024 12:16:03 GMT
Content-Type: text/plain;charset=ISO-8859-1
Content-Length: 249
Connection: close
NODE: authserver-service.authserver.svc.cluster.local
Server: Nintendo

retry=MA**&returncd=MDA3&servicetoken=CJyBSE-auxaKzdxCnvLJoRicRYB0OnFLoA1wk7Kc34yHTItFZRx.44-DvizdksgEZf-BRyqNeHtUkjqzR3b69XftWqNdg7mZDg-P2rz0jqTTkujbTXwEXsDuqnYx30K2DrcY97F7m52HXBiJCCKnmQ**&statusdata=WQ**&svchost=bi9h&datetime=MjAyNDAyMDkxMjE2MDM*

Example error response:

1
2
3
4
5
6
7
8
HTTP/1.1 200 OK
NODE: pd42wfiap01
Content-Type: text/plain;charset=ISO-8859-1
Content-Length: 56
Date: Wed, 19 Jan 2022 09:21:41 GMT
Server: Nintendo Wii (http)

retry=MA**&returncd=MTA5&datetime=MjAyMjAxMTkwOTIxNDE*

Redirect to http://www.nintendo.com

1
2
3
4
5
HTTP/1.0 302 Moved Temporarily
Location: http://www.nintendo.com
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
Contents