Hello,
I’m using the Node.js SDK, specifically the composeMessageReply method. When I call this method, I get an HTTP 400 error with the message: *“Something went wrong. Please try again later.”*
I double-checked the parameters passed to composeMessageReply and also looked into the SDK source code in node_modules. The request to the API seems correct:
curl --request POST --url ‘https://api.us.nylas.com/v3/grants/0f819490-5b3d-4e66-b647-3a1a2da0634e/messages/199536d4bbf3e064/smart-compose’ --header ‘Accept: application/json, application/gzip’ --header ‘Authorization: Bearer *******’ --header ‘Content-Type: application/json’ --data ‘{“prompt”: “Reply to John Doe about the upcoming project.”}’ {“request_id”:“ca5a75769caa489cb1d0fd5ff379a6c1”,“error”:{“type”:“unexpected_error”,“message”:“Something went wrong. Please try again later.”}}
and
curl --request POST --url ‘https://api.us.nylas.com/v3/grants/0f819490-5b3d-4e66-b647-3a1a2da0634e/messages/smart
-compose’ --header ‘Accept: application/json, application/gzip’ --header ‘Authorization: Bearer ******’ --header ‘Content-Type: application/json’ --data ‘{“promp
t”: “write to John Doe about new random project.”}’
{“request_id”:“840e47019dee4a4c8835db8a366615ea”,“error”:{“type”:“unexpected_error”,“message”:“Something went wro
ng. Please try again later.”}}