@miplodder, welcome to CB community. I replied you on stackoverflow, but let me add an answer here:
You are using Public APIs to create bulk docs. Using Public APIs, you need to send request with a valid & authenticated user. You need firstly create a session with username/password if you haven’t done so:
the POST session request will return a cookie and a session id, in your _bulk_docs request, you need to attach the cookie in your POST request, so sync gateway service will use it to authenticate and secure the request.