{"detail": "Invalid token"} for working integration

We are notifying releases using the code at https://docs.sentry.io/learn/releases/, our bash script includes:
curl https://sentry.io/api/0/organizations/:{SENTRY_ORGANISATION_SLUG}/releases/ \ -X POST \ -H 'Authorization: Bearer {SENTRY_DEPLOY_TOKEN}’
-H ‘Content-Type: application/json’
-d ’
“version”: “{LAST_GIT_COMMIT}", "refs": [{ "repository":"{GITHUB_REPOSITORY}”,
“commit”:"{LAST_GIT_COMMIT}" }], "projects":["{SENTRY_PROJECT}"]

with, obviously, all the variables set.
When we run this as part of our build process on Codeship, we get the error
{“detail”: “Invalid token”}
but - it all works and all our releases appear in the release tab for the project.
(In addition, each issue is able to pull our php code from github for debugging, so it wouldn’t appear to be a github webhook issue either. The only item of any note is authors aren’t visible for each commit, but the commits themselves are.).
So I’m not sure what this error indicates, and I would like to get rid of it in case ignoring it masks a future actual error, but at this time it doesnt seem to reflect a problem we can fix…
Has anyone seen this and fixed it?