<div dir="ltr">Hi,<div><br></div><div>I am unable to reproduce the problem, using latest 1.2.0-alpha.1, both tokens worked, for an iOS variant:</div><div>* fffffffffffffffffffffffffffffffffffffe432da6199aa9b1c49f6ab99f7e20bdf9ae5df25569e7b43fc550c6c461aecd</div><div>* ffffffffffffffffffffffffffffffffffffe432da6199aa9b1c49f6ab99f7e20bdf9ae5df25569e7b43fc550c6c461aecd</div><div><br></div><div>What's the version you are on? </div><div><br></div><div>-Matthias</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 15, 2016 at 4:07 PM, ffraticelli <span dir="ltr"><<a href="mailto:ffraticelli@unog.ch" target="_blank">ffraticelli@unog.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,
I found this (blocking) issue using the REST API for registering devices.
It's a test container, you can use the commands below and I will delete the variant once this issue is confirmed by your team.
The following curl works and registers the device token:
curl -u "daa39c18-fdae-4696-b24f-041008f8a28a:a3186331-5e54-48b1-be2f-30b348d9dd40" \
-v -H "Accept: application/json" -H "Content-type: application/json" -H "aerogear-push-id: someid" \
-X POST -d \
'{
"deviceToken" : "fffffffffffffffffffffffffffffffffffffe432da6199aa9b1c49f6ab99f7e20bdf9ae5df25569e7b43fc550c6c461aecd",
"deviceType" : "iPad",
"operatingSystem" : "iOS",
"osVersion" : "6.1.2"
}' \
<a href="https://aerogear-unog.rhcloud.com/ag-push/rest/registry/device" target="_blank">https://aerogear-unog.rhcloud.com/ag-push/rest/registry/device</a>
<b>While the following receives an HTTP 400 Bad Request. The only different between the 2 is an additional 'f' in the following token.</b>
curl -u "daa39c18-fdae-4696-b24f-041008f8a28a:a3186331-5e54-48b1-be2f-30b348d9dd40" \
-v -H "Accept: application/json" -H "Content-type: application/json" -H "aerogear-push-id: someid" \
-X POST -d \
'{
"deviceToken" : "ffffffffffffffffffffffffffffffffffffe432da6199aa9b1c49f6ab99f7e20bdf9ae5df25569e7b43fc550c6c461aecd",
"deviceType" : "iPad",
"operatingSystem" : "iOS",
"osVersion" : "6.1.2"
}' \
<a href="https://aerogear-unog.rhcloud.com/ag-push/rest/registry/device" target="_blank">https://aerogear-unog.rhcloud.com/ag-push/rest/registry/device</a>
With the actual token (without the f list) t doesn't work either, 400 error.
        
        
        
<br><hr align="left" width="300">
View this message in context: <a href="http://aerogear-users.1116366.n5.nabble.com/bug-in-the-REST-API-tp592.html" target="_blank">bug (?) in the REST API</a><br>
Sent from the <a href="http://aerogear-users.1116366.n5.nabble.com/" target="_blank">aerogear-users mailing list archive</a> at Nabble.com.<br><br>_______________________________________________<br>
Aerogear-users mailing list<br>
<a href="mailto:Aerogear-users@lists.jboss.org">Aerogear-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-users" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Matthias Wessendorf <br><br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a></div>
</div>