whatsapp-http-api icon indicating copy to clipboard operation
whatsapp-http-api copied to clipboard

Define an API base for API - Endpoints and FILES

Open allburov opened this issue 1 year ago • 0 comments

Discussed in https://github.com/devlikeapro/whatsapp-http-api/discussions/95

Originally posted by goleadev May 10, 2023 Hello,

Is it possible to define a base path for the API? Currently, all API calls need to be made to http://localhost:3000 (e.g. http://localhost:3000/api/session/start). Is it possible to change this to something like http://localhost:3000/waha (e.g. http://localhost:3000/waha/api/session/start)?


  • [ ] WHATSAPP_API_PREFIX=waha/v1 - change base urls to
    • [ ] API endpoints - http://localhost:3000/waha/v1 (e.g. http://localhost:3000/waha/v1/api/session/start)
    • [ ] Files endpoints (if there's no WHATSAPP_FILE_DOWNLOAD_PREFIX)
  • [ ] WHATSAPP_FILES_DOWNLOAD_API_PREFIX=waha/v1 - in case if one put WAHA behind reverse proxy and we want to get the right URL in webhooks for files

allburov avatar May 12 '23 04:05 allburov