What worked for me was omitting http from the curl request and adding the Kibana's server hash before the /api part of the URL. So something like:
curl -X GET --user username:password "localhost:5601/ogp/api/kibana/dashboards/export?dashboard=<dashboard_id>"