Description | Endpoint |
---|---|
Log-in OAuth | GET /receive_code/ |
Log-in Demo | POST /demo/ |
Log-out current user | POST /logout |
Get User Info | GET /user/basicinfo/ |
Get User Relatives | POST /user/relativesinfo/ |
Get User's SNP Data | POST /user/snpinfo/ |
Description | Endpoint |
---|---|
Access to 23&Me Individual data | GET /1/user/:userID |
Access to 23&Me Genotype data | GET /1/genotype/:userID |
Access to 23&Me Relative data | GET /1/relatives/:userID |
Redirects back to server after acquiring access token after User approves OAuth permissions
curl -H 'Accept: auth-url' -H 'Authorization: OAuth <access_token>' \
-X GET https://BASE_API_URL +
{
'client_id': CLIENT_ID,
'client_secret': CLIENT_SECRET,
'grant_type': 'authorization_code',
'code': request.args.get('code'),
'redirect_uri': REDIRECT_URI,
'scope': DEFAULT_SCOPE
}
Allows visitors to access site as a demo user
{
'demo_profile_id': 'demo_id',
'demo_first_name': 'Foo',
'demo_last_name': 'Bar'
'demo_data': [
'sex': 'm/f',
'rs_id': 'demo_basepairs',
...
]
}
Logs out user from session and clears cookies/cache
{
'user_profile_id': 'profile_id',
'headers': {
'cookie': {
'token': 'asj238xlzhs_uw28hzbhslsm8es9'
}
}
}
Fetches the basic information of the current authorized user
{
"user": {
"profile_id": 1738,
"first_name": "Foo",
"last_name": "Bar",
"location": "United States",
"picture_url": ""
}
}
Gathers information about the current user's relatives
{
'user_profile_id': 'profile_id',
'headers': {
'cookie': {
'token': 'asj238xlzhs_uw28hzbhslsm8es9'
}
}
}
{
"user_profile_id": "profile_id",
"relatives": [
{"relative1": {
"first_name": "Foo",
"last_name": "Bar",
"sex": "m/f",
"residence": "California",
"similarity": 0.25,
"maternal_side": "False",
"paternal_side": "True",
"birth_year": 1992,
"relationship": "Brother",
"birthplace": "United States",
"ancestry": "Northwestern Europe",
"picture_url": ""
}},
{"relative2": {
"first_name": "Foo2",
"last_name": "Bar2",
"sex": "m/f",
"residence": "California",
"similarity": 0.25,
"maternal_side": "False",
"paternal_side": "True",
"birth_year": 1990,
"relationship": "Sister",
"birthplace": "United States",
"ancestry": "Northwestern Europe",
"picture_url": ""
}},
...
]
}
Gathers DNA information about the current user
{
'user_profile_id': 'profile_id',
'headers': {
'cookie': {
'token': 'asj238xlzhs_uw28hzbhslsm8es9'
}
}
}
{
"user_profile_id": "profile_id",
"body": [
{"rs270831": {
"title": "Lactose Intolerance",
"dna_pair": "AA",
"outcome": "You have a high likelihood of being lactose intolerant",
"video": "4UvzSuP_Tzd"
}},
{"rs812202": {
"title": "Cilantro",
"dna_pair": "GG",
"outcome": "You are likely to experience a dislike for cilantro, may taste like soap",
"video": "TZs309snmr"
}},
...
]
}
Requests user's information upon login from 23andMe's designated endpoint
curl -H 'Accept: %s%sBASE_API_URL + '/1/user/' + 'user_id'' -H 'Authorization: 'Bearer %s' % access_token' \ -X GET https://auth-url/1/user?email=true
Requests user's unique genotype information upon login from 23andMe's designated endpoint
curl -H 'Accept: %s%sBASE_API_URL + '/1/genotype/' + 'user_id'' -H 'Authorization: 'Bearer %s' % access_token' \ -X GET https://auth-url/1/genotype/
Requests user's relatives' information upon login from 23andMe's designated endpoint
curl -H 'Accept: %s%sBASE_API_URL + '/1/user/' + 'user_id'' -H 'Authorization: 'Bearer %s' % access_token' \ -X GET https://auth-url/1/relatives