Open API bug or my stupidity

Discussion in 'Join' started by Thermopyle, Jul 14, 2016.

  1. Thermopyle

    Thermopyle New Member

    Joined:
    Jul 14, 2016
    Messages:
    1
    Likes Received:
    0
    If I GET this URL:

    h.t.t.p.s://joinjoaomgcd.appspot.com/_ah/api/messaging/v1/sendPush?deviceIds=group.chrome,INSERT_DEVICE_ID&text=hi&apikey=INSERT_API_KEY

    I get back

    {'errorMessage': 'No device to send message to',
    'etag': '"oFqVdZPMd_xxT7qBDKVRjB_xhNY/cL2UQTnATieiLulCcZT1AMcm6Jk"',
    'kind': 'messaging#resourcesItem',
    'success': False,
    'userAuthError': False}

    I would expect to be able to do this because...it just makes sense I think?

    As is, I have to do two requests, one with the device ID and one with the group.

    I don't know if this is a bug or just inherent in the way your backend works...
     
    Last edited: Jul 14, 2016
  2. Baudbox

    Baudbox New Member

    Joined:
    Feb 7, 2015
    Messages:
    8
    Likes Received:
    0
    I guess you add an extra "s" on deviceIds=group.chrome

    It should like deviceId=group.chrome

    deviceIds is used if you specify each device.

    Hope that helps
     
  3. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Did that work for you? :)
     
  4. Baudbox

    Baudbox New Member

    Joined:
    Feb 7, 2015
    Messages:
    8
    Likes Received:
    0
    indeed, not as I'm using only group directive and not specific device.
    but after reading again the issue, I do confirm that mixing group+specific device_id don't work together.
     
: api

Share This Page