Unlock seamless workflows and faster delivery with our latest releases – get the details

Discussion about adding a collaborator to a Sanity project and the possibility of paying for additional roles on the free plan.

21 replies
Last updated: Jul 23, 2021
Hello! I've run into a problem which I can't really explain except from misunderstanding something. 🤔 I'm currently developing a next.js/sanity based portfolio (on the free plan), up until now alone. Ive got everything working - from vercel deploys to live preview. Now i wanted to Invite a friend (also as administrator) to that sanity project, helping me filling in some content (and flexing that sweet live preview, of course). But no matter what, when trying to access the deployed studio he gets a "Unauthorized" when logging in. I checked the network tab, and saw that the
me
cookie is quite different for him than for me.His:

{"id":"myCollaboratorsId", "name":"myCollaborator", "email":"myCollaborator@domain", "profileImage":null, "roles":[]}
wheras mine looks like this:


{"id": "myId", "name":"myself", "email":"myself@domain", "profileImage":null, "role":"administrator" ,"roles":[{"name": "administrator", "title": "Administrator", "description": "Read and write access to all datasets, with full access to all project settings."}]}
In the sanity management console we appear to have the exact same roles though. I don't understand why his roles are essentially non-existant. Any Ideas what's the issue here? I feel like I'm missing something obvious. Thanks in advance!
Jul 23, 2021, 4:06 PM
It could be possible they accepted the invitation using a different service provider than the one they’re now trying to log in with.
Jul 23, 2021, 4:20 PM
If you curl
<https://api.sanity.io/v2021-07-22/projects/><PROJECT_ID>/acl
with a token, can you see two administrators?
Jul 23, 2021, 4:22 PM
If you curl
<https://api.sanity.io/v2021-07-22/projects/><PROJECT_ID>/acl
with a token, can you see two administrators?
Jul 23, 2021, 4:22 PM
curl --request GET \
  --url <https://api.sanity.io/v2021-07-22/projects/><PROJECT_ID>/acl \
  --header 'Authorization: Bearer <ENTER TOKEN HERE>'
Jul 23, 2021, 4:25 PM
This curl returns an array with just 1 user, myself - should this return all users?
Jul 23, 2021, 4:31 PM
This curl returns an array with just 1 user, myself - should this return all users?
Jul 23, 2021, 4:31 PM
And thanks for the swift answer!
Jul 23, 2021, 4:31 PM
This curl returns an array with just 1 user, myself - should this return all users?
Jul 23, 2021, 4:31 PM
Okay, nevermind. I found the issue. I was constantly looking at the wrong project - as i made a copy once with a simlar name. I'll tar and feather myself and leave in shame 😬
Jul 23, 2021, 4:34 PM
This curl returns an array with just 1 user, myself - should this return all users?
Jul 23, 2021, 4:31 PM
Glad you got it figured out! Put the tar and feathers away and be glad you got this one solved before it put a damper on your whole weekend. 🙌
Jul 23, 2021, 4:41 PM
And yes, that curl command should return all users on a given project .
Jul 23, 2021, 4:43 PM
Thanks Geoff - it was indeed looking dire for that weekend until now, heh. Another quick question though - the
developer
plan seems to be gone, correct? Is there any other way to get editor roles into the free account for a small fee instead of going 99/mo?
Jul 23, 2021, 4:45 PM
For all new projects, yes that is currently correct. However, there is an internal conversation underway to revisit the roles and though I don’t know any specifics, I’m sure it’s something to stay tuned for.
Jul 23, 2021, 4:50 PM
For all new projects, yes that is currently correct. However, there is an internal conversation underway to revisit the roles and though I don’t know any specifics, I’m sure it’s something to stay tuned for.
Jul 23, 2021, 4:50 PM
Oh, okay! Super glad to hear that. Honestly, if that would be possible (paying a little extra for enabling a role) you'd never get rid of me as a client anymore.
Jul 23, 2021, 4:52 PM
Oh, okay! Super glad to hear that. Honestly, if that would be possible (paying a little extra for enabling a role) you'd never get rid of me as a client anymore.
Jul 23, 2021, 4:52 PM
Thanks for all the help (albeit more like impersonating a rubberduck 😉 ) - I wish you a splendid weekend!
Jul 23, 2021, 4:54 PM
I’ll be a rubber duck any time!
Thanks for the feedback. I’ll pass it along.
🙌
Jul 23, 2021, 4:56 PM
You have a great weekend as well!
Jul 23, 2021, 4:56 PM
👋
Jul 23, 2021, 4:56 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?