How can I send a request in order to test my Custo...
# 🤝help
f
Hi ! I've been building a Custom Integration since a while now since I'm actually in internship and i'm learning JS and TS while building it but now i've come across the fact that i can't test my integration when I serve it locally or with "bp dev". The problem is I don't send request as the error message telling me what the program is expected and what it receives set as "undefined". I 've been searching in the doc but I haven't found anything yet Here is the error message !
Copy code
Error while handling request {
  error: '[\n' +
    '  {\n' +
    `    "expected": "'webhook_received' | 'message_created' | 'action_triggered' | 'register' | 'unregister' | 'ping' | 'create_user' | 'create_conversation'",\n` +
    '    "received": "undefined",\n' +
    '    "code": "invalid_type",\n' +
    '    "path": [],\n' +
    '    "message": "Required"\n' +
    '  }\n' +
    ']'
}
f
What kind of integration are you building?
f
I'm building an integration to fetch the content of the Sharepoint Pages that I created as tutorial for my coworkers and I'll create more so I'm trying to fetch it automatically !
f
Have you watched the videos from Botpress on how to build an integration?
f
Yes i've watched but I finally made it to the github and the source code of the exisiting integrations which turn to be very helpful
Hello @fresh-fireman-491 ! Do you have any idea how can I manage to send a request while serving my project locally ?
f
Hey there Questions about the V12 should go in #1112845893931110402 🙂
s
@flat-waiter-90531 Hey. I’m curious how your integration went and if it worked
q
@flat-waiter-90531 Hello there! I´m starting with botpress and i am having the same problem, did you solve it? and how?
b
@flat-waiter-90531 any luck? Been trying for a few days to get this to work. Very frustrating, running out of ideas.
@flat-waiter-90531 basically, this is expected on localhost when hitting the port via postman or curl. Essentially, once you run bp dev, you should get something like this: ✔ Dev Integration deployed with id "devint_FOOBARRR56AKJDZ21R" at "https://tunnel.botpress.cloud/a9c711d5-aa15-4e55-92c1-4779cc0" You can take that tunnel.botpress.cloud/xxxx url and navigate to Dashboard -> Your Integrations -> Settings -> Self hosted integration's url and then save. Once that URL is in there, your app will ping localhost off of your codebase vs. what is in the cloud so you can more easily test. You get a new URL everytime you do bp dev, so you'll have to change that each time. Certain features, like cards where you need to see botpress cloud interface would be hard to test in this way, but everything else should be fine.
3 Views