settings Params

Param name Description
id required . Must be String

The requested id

comments powered by <span class='logo-disqus'>Disqus</span>
GET /v2/messages/15
200
{
  "id": 15,
  "author": {
    "id": 1,
    "login": "jeanne",
    "url": "https://api.intra.42.fr/v2/users/jeanne"
  },
  "content": "Salvia lomo meditation direct trade goth jean shorts. Offal mumblecore gluten-free farm-to-table pop-up normcore. Banjo post-ironic neutra sustainable tote bag. Knausgaard plaid etsy dreamcatcher shabby chic. Readymade occupy authentic post-ironic trust fund whatever mumblecore skateboard.\nPortland flexitarian skateboard squid. Literally vhs chia. Authentic polaroid pickled schlitz hammock tumblr gluten-free. Distillery bespoke blue bottle gentrify keffiyeh pour-over. Food truck lo-fi humblebrag sriracha.\nKale chips park swag listicle truffaut direct trade brooklyn. Tumblr cliche wolf thundercats master small batch bespoke. Blue bottle wolf pinterest swag venmo salvia direct trade plaid.",
  "content_html": null,
  "replies": [
    {
      "id": 19,
      "author": {
        "id": 28,
        "login": "weantill",
        "url": "https://api.intra.42.fr/v2/users/weantill"
      },
      "content": "Yolo meggings everyday fanny pack diy tousled wes anderson butcher. Squid yolo godard pickled. Bitters keffiyeh leggings wes anderson gastropub austin post-ironic hashtag.\nTaxidermy cardigan mlkshk street pitchfork deep v. Squid fashion axe leggings beard humblebrag synth gentrify trust fund. Gastropub normcore viral. Crucifix bushwick keytar taxidermy kickstarter cronut tattooed.\nBushwick next level flexitarian organic vice fixie. Cornhole blog next level mlkshk ramps portland 8-bit cray. Pickled heirloom cred pork belly tattooed yuccie. Hammock health kombucha. Bicycle rights lomo pinterest authentic banh mi park art party.",
      "content_html": null,
      "replies": [],
      "created_at": "2017-03-06T14:59:39.092Z",
      "updated_at": "2017-03-06T14:59:39.092Z",
      "parent_id": 15,
      "is_root": false,
      "messageable_id": 2,
      "messageable_type": "Topic",
      "votes_count": {
        "upvote": 0,
        "downvote": 0,
        "trollvote": 0,
        "problem": 0
      },
      "user_votes": {
        "upvote": false,
        "downvote": false,
        "trollvote": false,
        "problem": false
      },
      "readings": 0
    },
    {
      "id": 20,
      "author": {
        "id": 61,
        "login": "dartcaed",
        "url": "https://api.intra.42.fr/v2/users/dartcaed"
      },
      "content": "Cray gastropub ethical cold-pressed poutine. Normcore chambray wolf. Venmo ramps normcore 3 wolf moon.\nVice franzen cred church-key actually pug tofu xoxo. Yr scenester lo-fi schlitz williamsburg wayfarers mumblecore. Gentrify pinterest vinegar ennui venmo chambray.\nAsymmetrical tousled hammock hashtag godard crucifix small batch helvetica. Skateboard blog mumblecore cold-pressed try-hard yr. Knausgaard pitchfork post-ironic blue bottle beard normcore carry 8-bit.",
      "content_html": null,
      "replies": [],
      "created_at": "2017-03-06T14:59:39.136Z",
      "updated_at": "2017-03-06T14:59:44.296Z",
      "parent_id": 15,
      "is_root": false,
      "messageable_id": 2,
      "messageable_type": "Topic",
      "votes_count": {
        "upvote": 0,
        "downvote": 0,
        "trollvote": 1,
        "problem": 0
      },
      "user_votes": {
        "upvote": false,
        "downvote": false,
        "trollvote": false,
        "problem": false
      },
      "readings": 0
    }
  ],
  "created_at": "2017-03-06T14:59:38.842Z",
  "updated_at": "2017-03-06T14:59:44.306Z",
  "parent_id": null,
  "is_root": false,
  "messageable_id": 2,
  "messageable_type": "Topic",
  "votes_count": {
    "upvote": 0,
    "downvote": 0,
    "trollvote": 0,
    "problem": 0
  },
  "user_votes": {
    "upvote": false,
    "downvote": false,
    "trollvote": false,
    "problem": false
  },
  "readings": 0
}
curl  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" "https://api.intra.42.fr/v2/messages/15"

{
  "id": 15,
  "author": {
    "id": 1,
    "login": "jeanne",
    "url": "https://api.intra.42.fr/v2/users/jeanne"
  },
  "content": "Salvia lomo meditation direct trade goth jean shorts. Offal mumblecore gluten-free farm-to-table pop-up normcore. Banjo post-ironic neutra sustainable tote bag. Knausgaard plaid etsy dreamcatcher shabby chic. Readymade occupy authentic post-ironic trust fund whatever mumblecore skateboard.\nPortland flexitarian skateboard squid. Literally vhs chia. Authentic polaroid pickled schlitz hammock tumblr gluten-free. Distillery bespoke blue bottle gentrify keffiyeh pour-over. Food truck lo-fi humblebrag sriracha.\nKale chips park swag listicle truffaut direct trade brooklyn. Tumblr cliche wolf thundercats master small batch bespoke. Blue bottle wolf pinterest swag venmo salvia direct trade plaid.",
  "content_html": null,
  "replies": [
    {
      "id": 19,
      "author": {
        "id": 28,
        "login": "weantill",
        "url": "https://api.intra.42.fr/v2/users/weantill"
      },
      "content": "Yolo meggings everyday fanny pack diy tousled wes anderson butcher. Squid yolo godard pickled. Bitters keffiyeh leggings wes anderson gastropub austin post-ironic hashtag.\nTaxidermy cardigan mlkshk street pitchfork deep v. Squid fashion axe leggings beard humblebrag synth gentrify trust fund. Gastropub normcore viral. Crucifix bushwick keytar taxidermy kickstarter cronut tattooed.\nBushwick next level flexitarian organic vice fixie. Cornhole blog next level mlkshk ramps portland 8-bit cray. Pickled heirloom cred pork belly tattooed yuccie. Hammock health kombucha. Bicycle rights lomo pinterest authentic banh mi park art party.",
      "content_html": null,
      "replies": [],
      "created_at": "2017-03-06T14:59:39.092Z",
      "updated_at": "2017-03-06T14:59:39.092Z",
      "parent_id": 15,
      "is_root": false,
      "messageable_id": 2,
      "messageable_type": "Topic",
      "votes_count": {
        "upvote": 0,
        "downvote": 0,
        "trollvote": 0,
        "problem": 0
      },
      "user_votes": {
        "upvote": false,
        "downvote": false,
        "trollvote": false,
        "problem": false
      },
      "readings": 0
    },
    {
      "id": 20,
      "author": {
        "id": 61,
        "login": "dartcaed",
        "url": "https://api.intra.42.fr/v2/users/dartcaed"
      },
      "content": "Cray gastropub ethical cold-pressed poutine. Normcore chambray wolf. Venmo ramps normcore 3 wolf moon.\nVice franzen cred church-key actually pug tofu xoxo. Yr scenester lo-fi schlitz williamsburg wayfarers mumblecore. Gentrify pinterest vinegar ennui venmo chambray.\nAsymmetrical tousled hammock hashtag godard crucifix small batch helvetica. Skateboard blog mumblecore cold-pressed try-hard yr. Knausgaard pitchfork post-ironic blue bottle beard normcore carry 8-bit.",
      "content_html": null,
      "replies": [],
      "created_at": "2017-03-06T14:59:39.136Z",
      "updated_at": "2017-03-06T14:59:44.296Z",
      "parent_id": 15,
      "is_root": false,
      "messageable_id": 2,
      "messageable_type": "Topic",
      "votes_count": {
        "upvote": 0,
        "downvote": 0,
        "trollvote": 1,
        "problem": 0
      },
      "user_votes": {
        "upvote": false,
        "downvote": false,
        "trollvote": false,
        "problem": false
      },
      "readings": 0
    }
  ],
  "created_at": "2017-03-06T14:59:38.842Z",
  "updated_at": "2017-03-06T14:59:44.306Z",
  "parent_id": null,
  "is_root": false,
  "messageable_id": 2,
  "messageable_type": "Topic",
  "votes_count": {
    "upvote": 0,
    "downvote": 0,
    "trollvote": 0,
    "problem": 0
  },
  "user_votes": {
    "upvote": false,
    "downvote": false,
    "trollvote": false,
    "problem": false
  },
  "readings": 0
}
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/messages/15")
response.status
# => 200
response.parsed
# => {"id"=>15, "author"=>{"id"=>1, "login"=>"jeanne", "url"=>"https://api.intra.42.fr/v2/users/jeanne"}, "content"=>"Salvia lomo meditation direct trade goth jean shorts. Offal mumblecore gluten-free farm-to-table pop-up normcore. Banjo post-ironic neutra sustainable tote bag. Knausgaard plaid etsy dreamcatcher shabby chic. Readymade occupy authentic post-ironic trust fund whatever mumblecore skateboard.\nPortland flexitarian skateboard squid. Literally vhs chia. Authentic polaroid pickled schlitz hammock tumblr gluten-free. Distillery bespoke blue bottle gentrify keffiyeh pour-over. Food truck lo-fi humblebrag sriracha.\nKale chips park swag listicle truffaut direct trade brooklyn. Tumblr cliche wolf thundercats master small batch bespoke. Blue bottle wolf pinterest swag venmo salvia direct trade plaid.", "content_html"=>nil, "replies"=>[{"id"=>19, "author"=>{"id"=>28, "login"=>"weantill", "url"=>"https://api.intra.42.fr/v2/users/weantill"}, "content"=>"Yolo meggings everyday fanny pack diy tousled wes anderson butcher. Squid yolo godard pickled. Bitters keffiyeh leggings wes anderson gastropub austin post-ironic hashtag.\nTaxidermy cardigan mlkshk street pitchfork deep v. Squid fashion axe leggings beard humblebrag synth gentrify trust fund. Gastropub normcore viral. Crucifix bushwick keytar taxidermy kickstarter cronut tattooed.\nBushwick next level flexitarian organic vice fixie. Cornhole blog next level mlkshk ramps portland 8-bit cray. Pickled heirloom cred pork belly tattooed yuccie. Hammock health kombucha. Bicycle rights lomo pinterest authentic banh mi park art party.", "content_html"=>nil, "replies"=>[], "created_at"=>"2017-03-06T14:59:39.092Z", "updated_at"=>"2017-03-06T14:59:39.092Z", "parent_id"=>15, "is_root"=>false, "messageable_id"=>2, "messageable_type"=>"Topic", "votes_count"=>{"upvote"=>0, "downvote"=>0, "trollvote"=>0, "problem"=>0}, "user_votes"=>{"upvote"=>false, "downvote"=>false, "trollvote"=>false, "problem"=>false}, "readings"=>0}, {"id"=>20, "author"=>{"id"=>61, "login"=>"dartcaed", "url"=>"https://api.intra.42.fr/v2/users/dartcaed"}, "content"=>"Cray gastropub ethical cold-pressed poutine. Normcore chambray wolf. Venmo ramps normcore 3 wolf moon.\nVice franzen cred church-key actually pug tofu xoxo. Yr scenester lo-fi schlitz williamsburg wayfarers mumblecore. Gentrify pinterest vinegar ennui venmo chambray.\nAsymmetrical tousled hammock hashtag godard crucifix small batch helvetica. Skateboard blog mumblecore cold-pressed try-hard yr. Knausgaard pitchfork post-ironic blue bottle beard normcore carry 8-bit.", "content_html"=>nil, "replies"=>[], "created_at"=>"2017-03-06T14:59:39.136Z", "updated_at"=>"2017-03-06T14:59:44.296Z", "parent_id"=>15, "is_root"=>false, "messageable_id"=>2, "messageable_type"=>"Topic", "votes_count"=>{"upvote"=>0, "downvote"=>0, "trollvote"=>1, "problem"=>0}, "user_votes"=>{"upvote"=>false, "downvote"=>false, "trollvote"=>false, "problem"=>false}, "readings"=>0}], "created_at"=>"2017-03-06T14:59:38.842Z", "updated_at"=>"2017-03-06T14:59:44.306Z", "parent_id"=>nil, "is_root"=>false, "messageable_id"=>2, "messageable_type"=>"Topic", "votes_count"=>{"upvote"=>0, "downvote"=>0, "trollvote"=>0, "problem"=>0}, "user_votes"=>{"upvote"=>false, "downvote"=>false, "trollvote"=>false, "problem"=>false}, "readings"=>0}