live_help Notes

assignment This action requires one of theses roles: Basic staff

settings Params

Param name Description
user_id optional . Must be String

The user id or slug

id required . Must be String

The requested id

GET /v2/user_candidatures/23
200
{
  "id": 23,
  "user_id": 23,
  "birth_date": "1993-05-04",
  "gender": "male",
  "zip_code": "71800-2563",
  "country": "Kashyyyk",
  "birth_city": "East Rosieland",
  "birth_country": "Kamino",
  "postal_street": "11747 Jerod Drives",
  "postal_complement": null,
  "postal_city": "Keagantown",
  "postal_zip_code": null,
  "postal_country": null,
  "contact_affiliation": null,
  "contact_last_name": null,
  "contact_first_name": null,
  "contact_phone1": null,
  "contact_phone2": null,
  "max_level_memory": null,
  "max_level_logic": null,
  "other_information": null,
  "language": null,
  "meeting_date": null,
  "piscine_date": null,
  "created_at": "2017-11-22T13:41:06.408Z",
  "updated_at": "2017-11-22T13:41:06.408Z",
  "phone": null,
  "email": "chewbacca@braunleuschke.biz",
  "pin": null,
  "phone_country_code": null,
  "hidden_phone": null
}
curl  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" "https://api.intra.42.fr/v2/user_candidatures/23"

{
  "id": 23,
  "user_id": 23,
  "birth_date": "1993-05-04",
  "gender": "male",
  "zip_code": "71800-2563",
  "country": "Kashyyyk",
  "birth_city": "East Rosieland",
  "birth_country": "Kamino",
  "postal_street": "11747 Jerod Drives",
  "postal_complement": null,
  "postal_city": "Keagantown",
  "postal_zip_code": null,
  "postal_country": null,
  "contact_affiliation": null,
  "contact_last_name": null,
  "contact_first_name": null,
  "contact_phone1": null,
  "contact_phone2": null,
  "max_level_memory": null,
  "max_level_logic": null,
  "other_information": null,
  "language": null,
  "meeting_date": null,
  "piscine_date": null,
  "created_at": "2017-11-22T13:41:06.408Z",
  "updated_at": "2017-11-22T13:41:06.408Z",
  "phone": null,
  "email": "chewbacca@braunleuschke.biz",
  "pin": null,
  "phone_country_code": null,
  "hidden_phone": null
}
require "oauth2"
UID = "Your application uid"
SECRET = "Your application secret"
client = OAuth2::Client.new(UID, SECRET, site: "https://api.intra.42.fr")
token = client.client_credentials.get_token

response = token.get("/v2/user_candidatures/23")
response.status
# => 200
response.parsed
# => {"id"=>23, "user_id"=>23, "birth_date"=>"1993-05-04", "gender"=>"male", "zip_code"=>"71800-2563", "country"=>"Kashyyyk", "birth_city"=>"East Rosieland", "birth_country"=>"Kamino", "postal_street"=>"11747 Jerod Drives", "postal_complement"=>nil, "postal_city"=>"Keagantown", "postal_zip_code"=>nil, "postal_country"=>nil, "contact_affiliation"=>nil, "contact_last_name"=>nil, "contact_first_name"=>nil, "contact_phone1"=>nil, "contact_phone2"=>nil, "max_level_memory"=>nil, "max_level_logic"=>nil, "other_information"=>nil, "language"=>nil, "meeting_date"=>nil, "piscine_date"=>nil, "created_at"=>"2017-11-22T13:41:06.408Z", "updated_at"=>"2017-11-22T13:41:06.408Z", "phone"=>nil, "email"=>"chewbacca@braunleuschke.biz", "pin"=>nil, "phone_country_code"=>nil, "hidden_phone"=>nil}