I'm currently testing out labelling functions on Quickslice, and I've run into an issue where my authentication seems to be insufficient for admin actions through an OAuth client. I'm trying to apply a label to an account via a Quickslice running on my local docker with the query exactly as it is in the tutorial:
mutation {
createLabel(
uri: "at://lexicon.store"
val: "!suspend"
) {
id
uri
val
cts
}
}
I have made sure I am OAuthing into Quickslice with my account (this instance should not be available on the open internet but tokens are elided nonetheless):
{
"access_token":"RZpQD...jcYFM",
"token_type":"Bearer",
"expires_in":3600,
"refresh_token":"axeYV...CjJVE",
"scope":"atproto transition:generic",
"sub":"did:plc:fxgreqfae3vqhyjsntsikfux"
}
I have made that same account an admin on my Quickslice instance:
Current Admins:
- did:plc:fxgreqfae3vqhyjsntsikfux
- did:plc:pz4sp2vf5w26wnaee253gfms
I am including the same access_token in my authentication:
Authorization: Bearer RZpQD...jcYFM
However, when I try to send that mutation to the /admin/graphql endpoint, I instead get this response:
{
"data": {
"createLabel": null
},
"errors": [
{
"message": "Authentication required",
"path": [
"createLabel"
]
}
]
}
Is there something I'm obviously missing here? I can't see what would cause my clearly admin account that I am sending my active bearer token to authenticate with to not be properly authenticated as an admin. This is being done through a C# client so there aren't any other tokens or cookies, and I can't use the JS client API.
Thanks for reporting. Yeah I've been meaning to fix that. Currently you can only interact with the admin API via the {your_slice_instance}/graphiql/admin interface.