vincere-io / restful-api-support

5 stars 0 forks source link

confirm subscription to wewbhook #28

Closed piyush-collabra closed 2 months ago

piyush-collabra commented 2 months ago

Hello,

I'm trying to subscribe to Vincere's webhook.

I've followed the documentation and my webhook_url is deployed and it supports AWS SNS SubscriptionConfirmation as well as Notification message payloads as well.

For testing purposes I tried to create a SNS topic and subscription from my own AWS account and tested the URL and it works fine.

Question I have is how do I activate subscription from Vincere's side? I thought when I call the vincere's Create Webhook API, (https://api.vincere.io/#post-/webhooks), it will trigger the Subscription workflow. However, that doesn't seem to be the case.

curl --location '<tenant>.vincere.io/api/v2/webhooks' \
--header 'x-api-key: <my-key>' \
--header 'id-token: <my-token>' \
--header 'Content-Type: application/json' \
--data '{
    "webhook_url": "https://<my-url>",
    "events": [
        {
            "entity_type": "APPLICATION",
            "action_types": [
                "SHORTLISTED"
            ]
        }
    ]
}'

. This returns Http.OK (200) but empty response {} (NO id is returned) and NO API calls to my webhook-url either for Subscriuption confirmation and/ or notification

I'm going back and forth with support person as well but looks like they have little clue about how integration works. Could anyone help?

Is there a way I could trigger the subscription by myself?

P.S. I've the API Keys, Client Id etc etc and I can call the Vincere auth and other APIs successfully. I'm stuck on Webhook APIs.

piyush-collabra commented 2 months ago

Thanks to support team.

It was a silly mistake of location not having https://. i.e.

curl --location 'https://<tenant>.vincere.io/api/v2/webhooks' \
....

It's working now. Closing the issue