Get login url to redirect to myinfo
GET
http://localhost:3001/users/me/external/myinfo-redirect-login
Get login url to redirect to myinfo. This url contains attributes about person data requested to myinfo.
Copy {
"message": "OK",
"data": {
"url": "https://test.api.myinfo.gov.sg/com/v3/authorise?client_id=STG2-MYINFO-SELF-TEST&attributes=name,dob,birthcountry,nationality,uinfin,sex,regadd&state=eb03c000-00a3-4708-ab30-926306bfc4a8&redirect_uri=http://localhost:3001/callback&purpose=python-myinfo-connector",
"state": "eb03c000-00a3-4708-ab30-926306bfc4a8"
}
}
url: url to redirect to myinfo.
state: Identifier that represents the user's session/transaction with the client for reconciling query and response. The same value will be sent back via the callback URL. Use a unique system generated number for each user/transaction.
Get person data from myinfo
GET
http://localhost:3001/users/me/external/myinfo
Get person data from myinfo. The API is final step of myinfo-connector-python
Query Parameters
Copy {
"message": "OK",
"sodata": {
"regadd": {
"country": {
"code": "SG",
"desc": "SINGAPORE"
},
"unit": {
"value": "10"
},
"street": {
"value": "ANCHORVALE DRIVE"
},
"lastupdated": "2022-07-14",
"block": {
"value": "319"
},
"source": "1",
"postal": {
"value": "542319"
},
"classification": "C",
"floor": {
"value": "38"
},
"type": "SG",
"building": {
"value": ""
}
},
"dob": "1988-10-06",
"sex": "M",
"name": "ANDY LAU",
"birthcountry": "SG",
"nationality": "SG",
"uinfin": "S6005048A"
}
}
regadd: Registered Address of Person (including FIN holders)
dob: Date of Birth of Person.
sex: Sex of Person.
name: Full Name of the Person.
unifin: Singapore issued identification number of the Person.
Copy {
"message": "Internal server error.",
"code": "INTERNAL_SERVER_ERROR",
"error": {
"title": "오류가 발생했습니다.",
"description": "Fail to get Myinfo Access Token. Authcode Might be re-used or expired.",
"code": "INTERNAL_SERVER_ERROR",
"data": null
}
}
Copy {
"message": "Internal server error.",
"code": "INTERNAL_SERVER_ERROR",
"error": {
"title": "오류가 발생했습니다.",
"description": "Fail to parse Myinfo Person Data.",
"code": "INTERNAL_SERVER_ERROR",
"data": null
}
}