<div dir="ltr">Could it be that it does not pass the token validation <a href="https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/model/api/src/main/java/org/jboss/aerogear/unifiedpush/api/validation/DeviceTokenValidator.java#L35">https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/model/api/src/main/java/org/jboss/aerogear/unifiedpush/api/validation/DeviceTokenValidator.java#L35</a> ? </div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 15, 2016 at 4:07 PM, ffraticelli <span dir="ltr">&lt;<a href="mailto:ffraticelli@unog.ch" target="_blank">ffraticelli@unog.ch</a>&gt;</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&#39;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 &quot;daa39c18-fdae-4696-b24f-041008f8a28a:a3186331-5e54-48b1-be2f-30b348d9dd40&quot;  \
   -v -H &quot;Accept: application/json&quot; -H &quot;Content-type: application/json&quot; -H &quot;aerogear-push-id: someid&quot; \
   -X POST  -d \
  &#39;{
     &quot;deviceToken&quot; : &quot;fffffffffffffffffffffffffffffffffffffe432da6199aa9b1c49f6ab99f7e20bdf9ae5df25569e7b43fc550c6c461aecd&quot;,
     &quot;deviceType&quot; : &quot;iPad&quot;,
     &quot;operatingSystem&quot; : &quot;iOS&quot;,
     &quot;osVersion&quot; : &quot;6.1.2&quot;
   }&#39;  \
   <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 &#39;f&#39; in the following token.</b>

   curl -u &quot;daa39c18-fdae-4696-b24f-041008f8a28a:a3186331-5e54-48b1-be2f-30b348d9dd40&quot;  \
   -v -H &quot;Accept: application/json&quot; -H &quot;Content-type: application/json&quot; -H &quot;aerogear-push-id: someid&quot; \
   -X POST  -d \
  &#39;{
     &quot;deviceToken&quot; : &quot;ffffffffffffffffffffffffffffffffffffe432da6199aa9b1c49f6ab99f7e20bdf9ae5df25569e7b43fc550c6c461aecd&quot;,
     &quot;deviceType&quot; : &quot;iPad&quot;,
     &quot;operatingSystem&quot; : &quot;iOS&quot;,
     &quot;osVersion&quot; : &quot;6.1.2&quot;
   }&#39;  \
   <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&#39;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></div>