We’re having a pretty urgent issue with the Migration API using the WriteClient. We're just trying to add some entries to a custom type. Everything was working until today that we started receiving this error: Unauthorized, invalid or missing authentication token.
We’ve not changed anything in the repo nor the code, and the tokens are the same. It happened with a client’s repo, but then we switched to our own repo to discard it was a repo issue and we’re getting the same error
I’m attaching a super basic example so it’s simpler for you to validate it. As you could see in the logs, if I add uid it seems to be reaching the API as it’s validating because I was receiving "The custom type does not support UID" error but then the "Unauthorized" error is back again.
Thank you in advance!
PD: In any case you need it here is the example code.
Same thing happened to me… It was perfectly working this morning, and now it raises "Unauthorized, invalid or missing authentication token".
Reading other posts about this, I did the following:
updated @prismicio/* and slicemachine dependencies
changed the visibility of the repo to 'Public API for Master only'
created a new permanent write token
generated a permanent access token (with access to master+releases)
added this token hardcoded to the createWriteClient call:
…and then the error changed to "User is not authorized to access this resource with an explicit deny"
Tried both my original migration code with many relationships, rich text fields, and group fields (which was actually working), and also a simpler version of only one document with text fields like in your example. None has worked yet…
I hope someone can shed some light on this matter soon, I'm also in a countdown to release. Any help would be much appreciated.
Thank you for reaching out about this and reporting the issue. We have a bug on our side and are currently looking into it. I'll return with an update when it is fixed!
Good news, this has been fixed! You should be able to resume using the Migration API as normal Let us know if you encounter any further issues, and thanks again for raising this.