Unable to subscribe to notifications (REST API)

  • fnwbr
    Rekening afgesloten

    34 berichten

    Duitsland

    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?
  • Rekening verwijderd
    Beheerder
    Rekening verwijderd

    0 berichten

    België

    De informatie is niet meer beschikbaar omdat de rekening van deze gebruiker is verwijderd (AVG)
  • fnwbr
    Rekening afgesloten

    34 berichten

    Duitsland

    Hey benjaminl,

    We're trying to create a new notification subscription: Link (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 ` Link (http) ` endpoint, with sending the following post fields:

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

    34 berichten

    Duitsland

    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.
  • Rekening verwijderd
    Beheerder
    Rekening verwijderd

    0 berichten

    België

    De informatie is niet meer beschikbaar omdat de rekening van deze gebruiker is verwijderd (AVG)
  • fnwbr
    Rekening afgesloten

    34 berichten

    Duitsland

    #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.
  • Rekening verwijderd
    Beheerder
    Rekening verwijderd

    0 berichten

    België

    De informatie is niet meer beschikbaar omdat de rekening van deze gebruiker is verwijderd (AVG)
  • vaccarisrl

    17 berichten

    Italië

    De informatie is niet meer beschikbaar omdat de rekening van deze gebruiker is verwijderd (AVG)
    • Aangemaakt 23 mei 2018 op 09:15
    • #863820
    I also got this error...

    notificationType: Curl_Seller_Item_Add
    destination: Link (https)

    and got:

    <error>The asked destination (" Link (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
    Rekening afgesloten

    34 berichten

    Duitsland

    De informatie is niet meer beschikbaar omdat de rekening van deze gebruiker is verwijderd (AVG)
    • Aangemaakt 23 mei 2018 op 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 " Link (https) ".

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

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

    <error>The asked destination (" Link (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 ' Link (http) ;' \
    --form notificationType=SoldItem \
    --form destination=<MY_URL>

    <error>The asked destination (" Link (https) ;) seems to be invalid!</error>
    <error>Cette valeur n'est pas valide.</error>
  • Rekening verwijderd
    Beheerder
    Rekening verwijderd

    0 berichten

    België

    De informatie is niet meer beschikbaar omdat de rekening van deze gebruiker is verwijderd (AVG)
  • fnwbr
    Rekening afgesloten

    34 berichten

    Duitsland

    De informatie is niet meer beschikbaar omdat de rekening van deze gebruiker is verwijderd (AVG)
    • Aangemaakt 24 mei 2018 op 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.
  • Rekening verwijderd
    Beheerder
    Rekening verwijderd

    0 berichten

    België

    De informatie is niet meer beschikbaar omdat de rekening van deze gebruiker is verwijderd (AVG)
  • fnwbr
    Rekening afgesloten

    34 berichten

    Duitsland

    De informatie is niet meer beschikbaar omdat de rekening van deze gebruiker is verwijderd (AVG)
    • Aangemaakt 25 mei 2018 op 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 Link (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.
  • Rekening verwijderd
    Beheerder
    Rekening verwijderd

    0 berichten

    België

    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 Link (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.
    • Aangemaakt 25 mei 2018 op 05:45
    • #864672
    De informatie is niet meer beschikbaar omdat de rekening van deze gebruiker is verwijderd (AVG)
  • Rekening verwijderd
    Beheerder
    Rekening verwijderd

    0 berichten

    België

    De informatie is niet meer beschikbaar omdat de rekening van deze gebruiker is verwijderd (AVG)
  • fnwbr
    Rekening afgesloten

    34 berichten

    Duitsland

    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.

Word lid van de verzamelaars-community!

Registreren Aanmelden