Unable to subscribe to notifications (REST API)

  • fnwbr
    Compte fermé

    34 messages

    Allemagne

    Trying to call the `notification/settings` endpoint (POST) with the following payload:

    ```
    [notificationType] => Curl_Seller_Item_Close_Sold
    [destination] => <...>/delcampeAPI.php
    ```

    returns the following unexpected response:

    ```
    [Delcampe_Notification] => Array
    (
    [Notification_Token] =>
    [Notification_Datetime] => 2018-05-22 11:26:00
    [Notification_Data] => Array
    (
    [Headers] => Array
    (
    [Ressource] => item
    [Action] => POST
    [Status] => 400
    )

    [body] => Array
    (
    [error] => Array
    (
    [0] => The asked destination ("<...>/delcampeAPI.php") seems to be invalid!
    [1] => The asked notification type (Sold_Close_Item) is not valid! Call getAvailableNotitications to receive a list of valid notifications type...
    [2] => Cette valeur n'est pas valide.
    )

    )

    )

    )

    )
    ```

    Both, `Curl_Seller_Item_Close_Sold` and the destination should be valid values. Why is this failing?
  • Compte supprimé
    Administrateur
    Compte supprimé

    0 message

    Belgique

    Les informations ne sont plus disponibles car le compte de cet utilisateur est supprimé (Règlement RGPD)
  • fnwbr
    Compte fermé

    34 messages

    Allemagne

    Hey benjaminl,

    We're trying to create a new notification subscription: Lien (https)

    We're pretty sure that we're making the right calls.
    This has been working forever, w're using the same file we've used in the past to do this.

    We're executing a POST call on the ` Lien (http) ` endpoint, with sending the following post fields:

    $postData = array(
    'notificationType' => 'Curl_Seller_Item_Close_Sold',
    'destination' => '<...>/delcampeAPI.php'
    );
  • fnwbr
    Compte fermé

    34 messages

    Allemagne

    I just tried this again, this time with a different Delcampe account that we take care of and we get the same error.
    I think the REST API endpoint to add a new notification might be misconfigured on your end.

    Also, the error message saying `Call getAvailableNotitications to receive a list of valid notifications type` is weird.
    There is no `getAvailableNotifications` call on the REST API. That's the SOAP API.
  • Compte supprimé
    Administrateur
    Compte supprimé

    0 message

    Belgique

    Les informations ne sont plus disponibles car le compte de cet utilisateur est supprimé (Règlement RGPD)
  • fnwbr
    Compte fermé

    34 messages

    Allemagne

    #0 The URL is valid. Of course I have redacted it from my message before posting to this forum.

    I just tried testing this with a different Delcampe account again, one where we have notifications setup and working. It tells me that my URL is invalid, even though for that exact same URL there are other notification subscriptions already existing!

    Is there any way I can send you a private message, so I can send you the full cURL command I'm running?



    #1 That's the problem! I'm sending in `Seller_Sold_Close_Item`, but it's saying that `Sold_Close_Item` is not valid. It doesn't make any sense.
    I tried to change the `notificationType` I send to be `Curl_Seller_Sold_Close_Item` instead, and now I get this error:

    <error>The asked notification type (SoldItem) is not valid! Call getAvailableNotitications to receive a list of valid notifications type...</error>

    Then I changed the `notificationType` I send to `SoldItem`, and voila, it seems to work. At least I'm not seeing any further errors for an invalid `notificationType` anymore now. Given that `SoldItem` is the new correct value, I think your documentation needs to be updated.



    However, I'm still unable to make the request go through because of #0.
  • Compte supprimé
    Administrateur
    Compte supprimé

    0 message

    Belgique

    Les informations ne sont plus disponibles car le compte de cet utilisateur est supprimé (Règlement RGPD)
  • vaccarisrl

    17 messages

    Italie

    Les informations ne sont plus disponibles car le compte de cet utilisateur est supprimé (Règlement RGPD)
    • Posté le 23 mai 2018 à 09:15
    • #863820
    I also got this error...

    notificationType: Curl_Seller_Item_Add
    destination: Lien (https)

    and got:

    <error>The asked destination (" Lien (https) ;) seems to be invalid!</error>
    <error>The asked notification type (StartedSale) is not valid! Call getAvailableNotitications to receive a list of valid notifications type...</error>
    <error>Cette valeur n'est pas valide.</error>

    What's wrong?
  • fnwbr
    Compte fermé

    34 messages

    Allemagne

    Les informations ne sont plus disponibles car le compte de cet utilisateur est supprimé (Règlement RGPD)
    • Posté le 23 mai 2018 à 09:45
    • #863865
    @vaccarisrl Thanks a lot for chiming in!

    ----------------------------

    @benjaminl

    Cool, just two clarifications one more time.
    1. It doesn't matter which user you try this with. It happens for all of them.
    2. It doesn't matter which URL you provide for the "destination" input. It says they are all invalid. In my examples below I used " Lien (https) ".

    In my case these are the requests and the responses I got. The Delcampe user is "rolfschwerdt".

    curl --request POST \
    --url ' Lien (http) ;' \
    --form notificationType=Seller_Item_Close_Sold \
    --form destination=<MY_URL>

    <error>The asked destination (" Lien (https) ;) seems to be invalid!</error>
    <error>The asked notification type (SoldItem) is not valid! Call getAvailableNotitications to receive a list of valid notifications type...</error>
    <error>Cette valeur n'est pas valide.</error>


    Now, after changing the `notificationType` to "SoldItem" I still get this:

    curl --request POST \
    --url ' Lien (http) ;' \
    --form notificationType=SoldItem \
    --form destination=<MY_URL>

    <error>The asked destination (" Lien (https) ;) seems to be invalid!</error>
    <error>Cette valeur n'est pas valide.</error>
  • Compte supprimé
    Administrateur
    Compte supprimé

    0 message

    Belgique

    Les informations ne sont plus disponibles car le compte de cet utilisateur est supprimé (Règlement RGPD)
  • fnwbr
    Compte fermé

    34 messages

    Allemagne

    Les informations ne sont plus disponibles car le compte de cet utilisateur est supprimé (Règlement RGPD)
    • Posté le 24 mai 2018 à 05:17
    • #864183
    Awesome! Thanks for letting us know!

    I'll be happy to forward this to our clients and let them know that they can use our Delcampe integration soon.
  • Compte supprimé
    Administrateur
    Compte supprimé

    0 message

    Belgique

    Les informations ne sont plus disponibles car le compte de cet utilisateur est supprimé (Règlement RGPD)
  • fnwbr
    Compte fermé

    34 messages

    Allemagne

    Les informations ne sont plus disponibles car le compte de cet utilisateur est supprimé (Règlement RGPD)
    • Posté le 25 mai 2018 à 04:53
    • #864642
    Thanks for getting back to us.

    However, we're still experiencing the exact same error messages.
    I have tried both `notificationTypes` values, "Seller_Item_Close_Sold" (which is documented in Lien (https) which gave me the same error again:

    [0] => The asked destination ("<...>/delcampeAPI.php") seems to be invalid!
    [1] => The asked notification type (Sold_Close_Item) is not valid! Call getAvailableNotitications to receive a list of valid notifications type...
    [2] => Cette valeur n'est pas valide.


    After that we tried "SoldItem" which still made these two errors show up:

    [0] => The asked destination ("<...>/delcampeAPI.php") seems to be invalid!
    [1] => Cette valeur n'est pas valide.
  • Compte supprimé
    Administrateur
    Compte supprimé

    0 message

    Belgique

    Thanks for getting back to us.

    However, we're still experiencing the exact same error messages.
    I have tried both `notificationTypes` values, "Seller_Item_Close_Sold" (which is documented in Lien (https) which gave me the same error again:

    [0] => The asked destination ("<...>/delcampeAPI.php") seems to be invalid!
    [1] => The asked notification type (Sold_Close_Item) is not valid! Call getAvailableNotitications to receive a list of valid notifications type...
    [2] => Cette valeur n'est pas valide.


    After that we tried "SoldItem" which still made these two errors show up:

    [0] => The asked destination ("<...>/delcampeAPI.php") seems to be invalid!
    [1] => Cette valeur n'est pas valide.
    • Posté le 25 mai 2018 à 05:45
    • #864672
    Les informations ne sont plus disponibles car le compte de cet utilisateur est supprimé (Règlement RGPD)
  • Compte supprimé
    Administrateur
    Compte supprimé

    0 message

    Belgique

    Les informations ne sont plus disponibles car le compte de cet utilisateur est supprimé (Règlement RGPD)
  • fnwbr
    Compte fermé

    34 messages

    Allemagne

    It's working again, exactly like it used to before!
    Just like you said, my mistake earlier today was to leave out the "Curl_" at the beginning.

    Thanks for fixing this before the weekend! Much appreciated.

Rejoignez la communauté des collectionneurs !

S'inscrire Se connecter