Good morning, when creating scoped API keys can th...
# community-help
d
Good morning, when creating scoped API keys can the collection name in the scope definition be an alias’ name rather than a collection name?
Copy code
{
  'description': 'Search-only key',
  'actions': ['documents:search'],
  'collections': ['collection-alias-name']
}
k
That's an interesting question. I don't think we support this.
It's a bit dangerous to support that though because it can accidentally lead to a wrong collection getting the permissions. We would rather keep this explicit.
d
Thanks Kishore, that’s very good to know and an excellent point about the security of the linked collection belonging to an alias. In our case the API users’ collections will be prefixed with a particular string unique to their user; we’ll make sure to limit access to this prefix followed by a wildcard. Thanks again for your help with this.