Need help on LingQ API
Richard_ 3475
Hi LingQ administrators,

I am trying some of the LingQ APIs. And I found some of them don't work as expected:
Returns lesson text.
Returns lesson lingqs.
Returns lesson stats.

After a get request is sent, content is returned. The returned content is html source code but not jason structure.
Here is the log of my operation, be ware of that I have replaced my token in the log:
curl '' -H 'Authorization: Token xxxxxxx' |more
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0<!DOCTYPE html>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="fb:page_id" content="47793958785">

This API works fine for me:
curl '' -H 'Authorization: Token xxxxxx'
[{"id": 10334, "title": "#6 English Greetings and Goodbyes", "description": "Listen in as Steve and Kate talk about the different forms of greetings and goodbyes in English.", "shared_date": "2003-12-01", "level": "Intermediate 2", "provider": "EnglishLingQ ", "roses_received": 12, "image": "", "new_word_count": 0, "duration": 334}]

Thanks in advance.
February 2014
  • Moderator
    alex 1705 656 31848
    @Richard_ - I ran this by one of our developers who had the following to say:

    "He is receiving HTML instead of JSON because he is passing the incorrect url. He gets a 404 error, which he can see if he passes -i parameter to curl.
    Actual url is"

    Hopefully this helps!
    February 2014
  • Moderator
    alex 1705 656 31848
    @Richard_ - Ah, glad to hear it. I'll pass this along!
    February 2014