Hi there,
I followed the official documentation to create certificate through API here.
But when I call this mutation:
mutation CreateCertificate {
addCertificate(appId: "my-app-id", hostname: "my-domain.com") {
certificate {
isConfigured
}
}
}
with the required Authorization header containing a valid account token:
{
"Authorization": "Bearer ..."
}
I have the following error:
{
"data": {
"addCertificate": null
},
"errors": [
{
"message": "Not authorized to manage this certificate.",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"addCertificate"
],
"extensions": {
"code": "UNAUTHORIZED"
}
}
]
}
Note that I can make other mutations like:
mutation CheckCertificate {
checkCertificate(
input: { appId: "my-app-id", hostname: "existing-domain.tld" }
) {
certificate {
isConfigured
}
}
}
the answer is ok:
{
"data": {
"checkCertificate": {
"certificate": {
"isConfigured": true
}
}
}
}
Do you have any idea to fix this issue?
Maybe it’s a Fly bug?
PS: you can try it yourself on official Fly playground.
Thanks for help!