Hi,
I am trying to implement creating a List through my API, but I am constantly getting a response of "Invalid parameters - Your request parameters are incorrect"
Even when trying with the apiary debugger I get the same message.
Is there something wrong with the API (unlikely) or my code (more likely)?
Here is a log trace of the output (if it helps at all)
[14:02:39 FINE] org.apache.http.impl.conn.DefaultClientConnection sendRequestHeader - >> POST /3/list?api_key=KEY&session_id=SESSIONHTTP/1.1
[14:02:39 FINE] org.apache.http.impl.conn.DefaultClientConnection sendRequestHeader - >> Content-Type: application/json
[14:02:39 FINE] org.apache.http.impl.conn.DefaultClientConnection sendRequestHeader - >> Accept: application/json
[14:02:39 FINE] org.apache.http.impl.conn.DefaultClientConnection sendRequestHeader - >> Content-Length: 144
[14:02:39 FINE] org.apache.http.impl.conn.DefaultClientConnection sendRequestHeader - >> Host: private-639f-themoviedb.apiary.io
[14:02:39 FINE] org.apache.http.impl.conn.DefaultClientConnection sendRequestHeader - >> Connection: Keep-Alive
[14:02:39 FINE] org.apache.http.impl.conn.Wire wire - >> "{"description":"This list was created to share all of the totally awesome movies I've seen.","name":"My Totally Awesome List!!","language":"en"}"
[14:02:39 FINE] org.apache.http.impl.conn.Wire wire - << "HTTP/1.1 400 Bad Request[\r][\n]"
[14:02:39 FINE] org.apache.http.impl.conn.Wire wire - << "Access-Control-Allow-Origin: *[\r][\n]"
[14:02:39 FINE] org.apache.http.impl.conn.Wire wire - << "Age: 0[\r][\n]"
[14:02:39 FINE] org.apache.http.impl.conn.Wire wire - << "Content-Type: application/json;charset=utf-8[\r][\n]"
[14:02:39 FINE] org.apache.http.impl.conn.Wire wire - << "Date: Wed, 20 Nov 2013 14:02:40 GMT[\r][\n]"
[14:02:39 FINE] org.apache.http.impl.conn.Wire wire - << "Server: nginx[\r][\n]"
[14:02:39 FINE] org.apache.http.impl.conn.Wire wire - << "Status: 400 Bad Request[\r][\n]"
[14:02:39 FINE] org.apache.http.impl.conn.Wire wire - << "Via: 1.1 varnish[\r][\n]"
[14:02:39 FINE] org.apache.http.impl.conn.Wire wire - << "X-Apiary-Ratelimit-Limit: 120[\r][\n]"
[14:02:39 FINE] org.apache.http.impl.conn.Wire wire - << "X-Apiary-Ratelimit-Remaining: 119[\r][\n]"
[14:02:39 FINE] org.apache.http.impl.conn.Wire wire - << "X-Apiary-Transaction-Id: 528cc100b09164020000b244[\r][\n]"
[14:02:39 FINE] org.apache.http.impl.conn.Wire wire - << "X-Cache: MISS[\r][\n]"
[14:02:39 FINE] org.apache.http.impl.conn.Wire wire - << "X-Cacheable-Status: 400[\r][\n]"
[14:02:39 FINE] org.apache.http.impl.conn.Wire wire - << "X-Varnish: 2385715400[\r][\n]"
[14:02:39 FINE] org.apache.http.impl.conn.Wire wire - << "X-Varnish-Sid: tm-v-p-1200[\r][\n]"
[14:02:39 FINE] org.apache.http.impl.conn.Wire wire - << "Content-Length: 95[\r][\n]"
[14:02:39 FINE] org.apache.http.impl.conn.Wire wire - << "Connection: keep-alive[\r][\n]"
[14:02:39 FINE] org.apache.http.impl.conn.Wire wire - << "[\r][\n]"
[14:02:39 FINE] org.apache.http.impl.conn.DefaultClientConnection receiveResponseHeader - Receiving response: HTTP/1.1 400 Bad Request
[14:02:39 FINE] org.apache.http.impl.conn.DefaultClientConnection receiveResponseHeader - << HTTP/1.1 400 Bad Request
[14:02:39 FINE] org.apache.http.impl.conn.DefaultClientConnection receiveResponseHeader - << Access-Control-Allow-Origin: *
[14:02:39 FINE] org.apache.http.impl.conn.DefaultClientConnection receiveResponseHeader - << Age: 0
[14:02:39 FINE] org.apache.http.impl.conn.DefaultClientConnection receiveResponseHeader - << Content-Type: application/json;charset=utf-8
[14:02:39 FINE] org.apache.http.impl.conn.DefaultClientConnection receiveResponseHeader - << Date: Wed, 20 Nov 2013 14:02:40 GMT
[14:02:39 FINE] org.apache.http.impl.conn.DefaultClientConnection receiveResponseHeader - << Server: nginx
[14:02:39 FINE] org.apache.http.impl.conn.DefaultClientConnection receiveResponseHeader - << Status: 400 Bad Request
[14:02:39 FINE] org.apache.http.impl.conn.DefaultClientConnection receiveResponseHeader - << Via: 1.1 varnish
[14:02:39 FINE] org.apache.http.impl.conn.DefaultClientConnection receiveResponseHeader - << X-Apiary-Ratelimit-Limit: 120
[14:02:39 FINE] org.apache.http.impl.conn.DefaultClientConnection receiveResponseHeader - << X-Apiary-Ratelimit-Remaining: 119
[14:02:39 FINE] org.apache.http.impl.conn.DefaultClientConnection receiveResponseHeader - << X-Apiary-Transaction-Id: 528cc100b09164020000b244
[14:02:39 FINE] org.apache.http.impl.conn.DefaultClientConnection receiveResponseHeader - << X-Cache: MISS
[14:02:39 FINE] org.apache.http.impl.conn.DefaultClientConnection receiveResponseHeader - << X-Cacheable-Status: 400
[14:02:39 FINE] org.apache.http.impl.conn.DefaultClientConnection receiveResponseHeader - << X-Varnish: 2385715400
[14:02:39 FINE] org.apache.http.impl.conn.DefaultClientConnection receiveResponseHeader - << X-Varnish-Sid: tm-v-p-1200
[14:02:39 FINE] org.apache.http.impl.conn.DefaultClientConnection receiveResponseHeader - << Content-Length: 95
[14:02:39 FINE] org.apache.http.impl.conn.DefaultClientConnection receiveResponseHeader - << Connection: keep-alive
[14:02:39 FINE] org.apache.http.impl.client.DefaultRequestDirector execute - Connection can be kept alive indefinitely
[14:02:39 FINE] org.apache.http.impl.conn.Wire wire - << "{"status_code":5,"status_message":"Invalid parameters - Your request parameters are incorrect"}"
[14:02:39 FINE] org.apache.http.impl.conn.PoolingClientConnectionManager releaseConnection - Connection [id: 0][route: {}->http://private-639f-themoviedb.apiary.io] can be kept alive indefinitely
[14:02:39 FINE] org.apache.http.impl.conn.PoolingClientConnectionManager releaseConnection - Connection released: [id: 0][route: {}->http://private-639f-themoviedb.apiary.io][total kept alive: 1; route allocated: 1 of 1; total allocated: 1 of 20]
[14:02:39 INFO] com.omertron.themoviedbapi.methods.TmdbListsTest test1CreateList - StatusCodeList[listId=<null>,statusCode=5,statusMessage=Invalid parameters - Your request parameters are incorrect]
Can't find a movie or TV show? Login to create it.
ต้องการให้คะแนนหรือเพิ่มรายการนี้ไปยังรายการหรือไม่
ไม่ใช่สมาชิกเหรอ
Reply by Snog
on November 21, 2013 at 10:14 ก่อนเที่ยง
It looks like you're not providing the list ID
The url should be more like /3/list/LISTID?api_key....
Reply by Stuart Boston
on November 21, 2013 at 10:33 ก่อนเที่ยง
I'm creating a list. I don't know what the list id is until after it's created.
Reply by Snog
on November 21, 2013 at 12:51 หลังเที่ยง
Sorry, I read past the create part without seeing it.