N
Novu5w ago
Bruno

does the API for Mark a subscriber feed message as seen work in v0.23.0

I get this error when I make a request, {"error": "Not Found", "message": "Cannot POST /v1/subscribers/d42un09etvpar5r/messages/mark-as", "statusCode": 404}
17 Replies
Pawan Jain
Pawan Jain5w ago
@Bruno checkout the swagger <your-selfh-hosted-api-base-url>/api
Bruno
Bruno5w ago
I have double-checked but still getting the same error
Pawan Jain
Pawan Jain5w ago
can you share your api base url?
Bruno
Bruno5w ago
@Pawan Jain It's for a deployed project with confidential information
Pawan Jain
Pawan Jain5w ago
Do you see this api in swagger?
Bruno
Bruno5w ago
yes
Novu_Bot
Novu_Bot5w ago
@Bruno, you just advanced to level 1!
Bruno
Bruno5w ago
const options = { method: 'POST', headers: { Authorization: novuApi, 'Content-Type': 'application/json', }, body: JSON.stringify({ messageId: id, markAs: 'read', }), }; return await fetch( https://${novuUrl}/v1/subscribers/${userId}/messages/mark-as, options ) .then((response) => response.json()) .then((response) => console.log('res::', response)) .catch((error) => console.log('errorAPI::', error)); };
Pawan Jain
Pawan Jain4w ago
@Bruno can you share /api-json raw data here ?
Bruno
Bruno4w ago
{"_bodyBlob": {"_data": {"collector": [Object], "blobId": "fdb72614-f68d-46da-a0e1-b3b76dd23348", "offset": 0, "size": 111}}, "_bodyInit": {"_data": {"collector": [Object], "blobId": "fdb72614-f68d-46da-a0e1-b3b76dd23348", "offset": 0, "size": 111}}, "bodyUsed": false, "headers": {"map": {"access-control-allow-credentials": "true", "access-control-allow-headers": "DNT,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization", "access-control-allow-methods": "GET, PUT, POST, DELETE, PATCH, OPTIONS", "access-control-allow-origin": "*", "access-control-max-age": "1728000", "content-length": "111", "content-security-policy": "default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests", "content-type": "application/json; charset=utf-8", "cross-origin-embedder-policy": "require-corp", "cross-origin-opener-policy": "same-origin", "cross-origin-resource-policy": "same-origin", "date": "Tue, 24 Sep 2024 15:43:26 GMT", "etag": "W/"6f-fDcu6WcwYW216llmvVANfZ37kLw"", "origin-agent-cluster": "?1", "referrer-policy": "no-referrer", "strict-transport-security": "max-age=15724800; includeSubDomains", "vary": "Origin, Accept-Encoding", "x-content-type-options": "nosniff", "x-dns-prefetch-control": "off", "x-download-options": "noopen", "x-frame-options": "SAMEORIGIN", "x-permitted-cross-domain-policies": "none", "x-xss-protection": "0"}}, "ok": false, "status": 404, "statusText": "", "type": "default", "url": "https://my-base-url-was-here/v1/subscribers/d42un09etvpar5r/messages/mark-as"}
Pawan Jain
Pawan Jain4w ago
Unfortunately, it is not helpful, as most of the data is not there Can you paste the whole content in a file and then send file here?
Bruno
Bruno4w ago
@Pawan Jain this is actually the whole response that I get
Pawan Jain
Pawan Jain3w ago
Pawan Jain
Pawan Jain3w ago
@Bruno Can you please share the whole .json like this ?
Bruno
Bruno3w ago
@Pawan Jain Thanks for the clarification here is the file
Pawan Jain
Pawan Jain3w ago
@Bruno As per this swagger, you should use this /v1/subscribers/d42un09etvpar5r/messages/markAs
Bruno
Bruno3w ago
@Pawan Jain again thanks so much
Want results from more Discord servers?
Add your server