Discussions

Ask a Question
Back to All

Implementing the new Notification API: 404 on /notification request

Hi, we are currently implementing the notification API and receive a 404 response from the notification request. As mentioned in https://dev.plugins.haiilo.com/reference/createnotification, this indicates that the feature is not available.

We implemented the process as suggested in the documentation:

  • Changed plugin manifest so enable apiAccess with scope "plugin:notify"
  • Provided an endpoint to receive the access_token response
    • ...which is definitely called on plugin installation and receives the expected data including authorization_code
  • we use that response data to request the actual accesstoken
    • we receive a valid accesstoken with expires_in: 599 and scope "plugin:notify"
  • then, a few seconds later, trigger a notification in our plugin instance, which creates a request to: https://{tenant}.coyocloud.com/api/plugins/{pluginId}/instance/{srcId}/notification
    with Authorization: Bearer ${accessToken}
    and the required notification data
    where pluginId is the pluginId from the access_token response (or the api/oauth/token, its identical)
    and srcId is the triggering plugin instance id

Thats when we receive the 404 error and don't know what's going wrong here. I didn't want to post all responses and tokens, but if you need any more detailed info i'm happy to provide these.

Another thing I noticed:
The diagram at https://dev.plugins.haiilo.com/docs/request-diagram mentions 401 responses for 'notify' which is in my understanding just a shortcode for the notification endpoint here: https://dev.plugins.haiilo.com/reference/createnotification
But at this page, a 401 is not mentioned. Is it just missing in documentation or if not, what is the response for an invalid token?

Kind regards and thanks in advance!
Marcus