Re: Add Comment - Error - Code 500, Error Detail "Your Comment is Empty" - Ideas on how to fix?

65 views
Skip to first unread message

Greg Avola

unread,
Jun 5, 2020, 9:26:57 AM6/5/20
to untappd-api-d...@googlegroups.com
Can you try key/value pairs, just "comment=Test"

Greg

On Fri, Jun 5, 2020 at 9:00 AM $ingh <thane...@gmail.com> wrote:
Hello,

Asking for some help on something that I'm sure is very simple! I've been working with the Untappd API and no problems with the majority of commands except Add Comment (I haven't yet tried check-in).

I've tried various different things, but keep getting the following error:

{"meta":{"code":500,"error_detail":"Your comment is empty - please try again","error_type":"invalid_param":"developer_friendly","response_time":{"time":0.028,"measure":"seconds"}},"response":[]}

My log file shows:
Sending body:
{"comment":testing}

I've also tried with single quotes outside, like: '{"comment":"testing"}'. I've tried quotes around testing too.
I've tried Content-Type headers of application/json and application x-www-form-urlencoded.

I get the same error everytime. If I put an invalid check-in ID in then that's the first error that comes up (i.e. telling me I've put an Invalid Check-in ID).
I'm not having problems sending POST requests with other APIs.

I'm sure this is something really simple but having searched the web I can't find anyone having similar problems. Is anyone able to advise on what I am doing wrong?

Stay safe all.

--
You received this message because you are subscribed to the Google Groups "Untappd API Developer Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to untappd-api-develop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/untappd-api-developer-group/6baf5330-a1df-4a01-856c-da41b9b3f044o%40googlegroups.com.


--
--

Greg Avola
Founder / Chief Creative Officer (CCO)
Untappd

Ronny G

unread,
Jun 6, 2020, 10:20:29 AM6/6/20
to Untappd API Developer Group
Thanks for the response. I've tried that, but still the same error message. I'm confused :/


On Friday, 5 June 2020 14:26:57 UTC+1, Greg Avola [Untappd] wrote:
Can you try key/value pairs, just "comment=Test"

Greg

On Fri, Jun 5, 2020 at 9:00 AM $ingh <thane...@gmail.com> wrote:
Hello,

Asking for some help on something that I'm sure is very simple! I've been working with the Untappd API and no problems with the majority of commands except Add Comment (I haven't yet tried check-in).

I've tried various different things, but keep getting the following error:

{"meta":{"code":500,"error_detail":"Your comment is empty - please try again","error_type":"invalid_param":"developer_friendly","response_time":{"time":0.028,"measure":"seconds"}},"response":[]}

My log file shows:
Sending body:
{"comment":testing}

I've also tried with single quotes outside, like: '{"comment":"testing"}'. I've tried quotes around testing too.
I've tried Content-Type headers of application/json and application x-www-form-urlencoded.

I get the same error everytime. If I put an invalid check-in ID in then that's the first error that comes up (i.e. telling me I've put an Invalid Check-in ID).
I'm not having problems sending POST requests with other APIs.

I'm sure this is something really simple but having searched the web I can't find anyone having similar problems. Is anyone able to advise on what I am doing wrong?

Stay safe all.

--
You received this message because you are subscribed to the Google Groups "Untappd API Developer Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to untappd-api-developer-group+unsub...@googlegroups.com.

Greg Avola

unread,
Jun 6, 2020, 10:43:21 AM6/6/20
to untappd-api-d...@googlegroups.com
Can you provide an example of your code? Or perhaps a postman example?

Greg

On Sat, Jun 6, 2020 at 10:20 AM Ronny G <thane...@gmail.com> wrote:
Thanks for the response. I've tried that, but still the same error message. I'm confused :/

On Friday, 5 June 2020 14:26:57 UTC+1, Greg Avola [Untappd] wrote:
Can you try key/value pairs, just "comment=Test"

Greg

On Fri, Jun 5, 2020 at 9:00 AM $ingh <thane...@gmail.com> wrote:
Hello,

Asking for some help on something that I'm sure is very simple! I've been working with the Untappd API and no problems with the majority of commands except Add Comment (I haven't yet tried check-in).

I've tried various different things, but keep getting the following error:

{"meta":{"code":500,"error_detail":"Your comment is empty - please try again","error_type":"invalid_param":"developer_friendly","response_time":{"time":0.028,"measure":"seconds"}},"response":[]}

My log file shows:
Sending body:
{"comment":testing}

I've also tried with single quotes outside, like: '{"comment":"testing"}'. I've tried quotes around testing too.
I've tried Content-Type headers of application/json and application x-www-form-urlencoded.

I get the same error everytime. If I put an invalid check-in ID in then that's the first error that comes up (i.e. telling me I've put an Invalid Check-in ID).
I'm not having problems sending POST requests with other APIs.

I'm sure this is something really simple but having searched the web I can't find anyone having similar problems. Is anyone able to advise on what I am doing wrong?

Stay safe all.

--
You received this message because you are subscribed to the Google Groups "Untappd API Developer Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to untappd-api-develop...@googlegroups.com.


--
--

Greg Avola
Founder / Chief Creative Officer (CCO)
Untappd

--
You received this message because you are subscribed to the Google Groups "Untappd API Developer Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to untappd-api-develop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/untappd-api-developer-group/51bf34c9-f0b2-400b-8487-2e0d68ae74ddo%40googlegroups.com.

Ronny G

unread,
Jun 6, 2020, 11:15:16 AM6/6/20
to Untappd API Developer Group
Sure. I've moved over to Postman to test there. Here's the log from the Postman Developer console:

POST https://api.untappd.com/v4/checkin/addcomment/[checkinidremovedforthispost]
1022 ms

Network
addresses: {…}
tls: {…}
Request Headers
Authorization: Bearer [redacted]
User-Agent: PostmanRuntime/7.25.0
Accept: */*
Postman-Token: [redacted]
Host: api.untappd.com
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
Content-Length: 18
▶Request Body
 "Comment": "Test"
▶Response Headers
Date: Sat, 06 Jun 2020 14:57:25 GMT
Content-Type: application/json; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Server: nginx
X-Ratelimit-Limit: 100
X-Ratelimit-Remaining: 91
X-Auth-Type: user
X-API-Version: 4
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT
Access-Control-Allow-Headers: Origin,Content-Type,Accept,X-Untappd-App,X-Untappd-App-Version
▶Response Body

{"meta":{"code":500,"error_detail":"Your comment is empty - please try again.","error_type":"invalid_param","developer_friendly":"","response_time":{"time":0.026,"measure":"seconds"}},"response":[]}


Other things I've tried: 
- Content-Type as application/json and as application/x-www-form-urlencoded and multipart/formdata
- I've also tried appending comment=test to the URL just in case that's what I was doing wrong.
- In terms of the body request within Post - I've tried Key and Value pairs within the x-www-formurlencoded and multipart/formdata as above (within these I've tried Comment with and without double quotes). I've also tried raw data in the Body: {comment:test} and {"comment":test}

I get the same error with everything I've tried. There's probably something really simple that I'm doing wrong and apologies for taking up so much of your time helping me to fix it if there is indeed a really simple solution! 
To unsubscribe from this group and stop receiving emails from it, send an email to untappd-api-developer-group+unsub...@googlegroups.com.


--
--

Greg Avola
Founder / Chief Creative Officer (CCO)
Untappd

--
You received this message because you are subscribed to the Google Groups "Untappd API Developer Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to untappd-api-developer-group+unsub...@googlegroups.com.

Greg Avola

unread,
Jun 6, 2020, 11:38:46 AM6/6/20
to untappd-api-d...@googlegroups.com
In postman - these needs to be done via key/value form data - not in the raw body.

So in postman - there is a form params, key/value pairs.

Does this make sense? I’m not near a computer right now - but needs to be sent key value pairs using for form data, not as body.

Greg

To unsubscribe from this group and stop receiving emails from it, send an email to untappd-api-develop...@googlegroups.com.


--
--

Greg Avola
Founder / Chief Creative Officer (CCO)
Untappd

--
You received this message because you are subscribed to the Google Groups "Untappd API Developer Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to untappd-api-develop...@googlegroups.com.
--
--

Greg Avola
Founder / Chief Creative Officer (CCO)
Untappd

--
You received this message because you are subscribed to the Google Groups "Untappd API Developer Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to untappd-api-develop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/untappd-api-developer-group/469e9942-62fd-4ac7-8dcc-014f1ab5f28eo%40googlegroups.com.

Greg Fiumara

unread,
Jun 6, 2020, 12:19:47 PM6/6/20
to untappd-api-d...@googlegroups.com
Ronny, in your example, you have "Comment" capitalized. Unsure if that matters. As Greg mentioned, you also need to use a key/value pair in the body. I downloaded Postman and used what you provided. Works just fine for me. Double-check your access token, spelling, key/value pairs, etc. See screenshot.


-Greg

Ronny G

unread,
Jun 6, 2020, 12:21:28 PM6/6/20
to Untappd API Developer Group
Hi again Greg,

Your help is much appreciated. I've removed the raw text in the body. I've gone to the "params" part (on the left of Authorization, Headers, Body, Pre-request Script, Tests, Settings). I've set Comment as the key and Test as the value. I've also tried all lower case and tried using double quotes. 

However I still get the same error (as below) each time. 

Any other things I could try?


To unsubscribe from this group and stop receiving emails from it, send an email to untappd-api-developer-group+unsub...@googlegroups.com.


--
--

Greg Avola
Founder / Chief Creative Officer (CCO)
Untappd

--
You received this message because you are subscribed to the Google Groups "Untappd API Developer Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to untappd-api-developer-group+unsub...@googlegroups.com.
--
--

Greg Avola
Founder / Chief Creative Officer (CCO)
Untappd

--
You received this message because you are subscribed to the Google Groups "Untappd API Developer Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to untappd-api-developer-group+unsub...@googlegroups.com.

Greg Fiumara

unread,
Jun 6, 2020, 12:28:11 PM6/6/20
to untappd-api-d...@googlegroups.com
Ronny, please try this curl command, substituting <#checkin_id#> and <#access_token#> (all one line):

curl --location --request POST 'https://api.untappd.com/v4/checkin/addcomment/<#checkin_id#>?access_token=<#access_token#>' --header 'Content-Type: application/x-www-form-urlencoded' --data-urlencode 'comment=This is another test comment.'

If this doesn't work, I'd assume there's an issue somewhere else. If it does, make sure your requested is formatted the same way in your code.

-Greg

To unsubscribe from this group and stop receiving emails from it, send an email to untappd-api-develop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/untappd-api-developer-group/d872176b-f521-4e79-84df-5c656b59b450o%40googlegroups.com.

-- 
Greg Fiumara



Ronny G

unread,
Jun 6, 2020, 12:43:14 PM6/6/20
to Untappd API Developer Group
Hi Greg Fiumara,

Thanks for this. having reviewed your screenshot and emulated what you have done, it works fine for me (so within Postman I must have not tried a lower case c for comment)!

However, having transferred the appropriate headers, queries (including the correct case this time) I'm still getting the same errors in AutoWeb when trying to add this an AP action. Must be an issue with AutoWeb then I guess? I've been able to add everything else fine (but haven't yet tried CheckIn).


To unsubscribe from this group and stop receiving emails from it, send an email to untappd-api-developer-group+unsub...@googlegroups.com.


--
--

Greg Avola
Founder / Chief Creative Officer (CCO)
Untappd


--
You received this message because you are subscribed to the Google Groups "Untappd API Developer Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to untappd-api-developer-group+unsub...@googlegroups.com.
--
--

Greg Avola
Founder / Chief Creative Officer (CCO)
Untappd


--
You received this message because you are subscribed to the Google Groups "Untappd API Developer Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to untappd-api-developer-group+unsub...@googlegroups.com.
--
--

Greg Avola
Founder / Chief Creative Officer (CCO)
Untappd


--
You received this message because you are subscribed to the Google Groups "Untappd API Developer Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to untappd-api-developer-group+unsub...@googlegroups.com.

-- 
Greg Fiumara



Ronny G

unread,
Jun 6, 2020, 2:28:51 PM6/6/20
to Untappd API Developer Group
I've also fixed within Autoweb now (which is where I'd been having all the trouble in the first place). Thank you so much for your help.

Key things learned for me was the need for the header to be: Content-Type: x-www-form-urlencoded and then the body to simply be 
comment=Any text here under 140 characters of course
with comment all being in lower-case.

Thank you so much for your help Greg Avola and Greg Fiumara! Cheers!
Reply all
Reply to author
Forward
0 new messages