Jump to content

NO_FORUM error when trying to create topic via GraphQL.


Go to solution Solved by Stuart Grimshaw,

Recommended Posts

Posted

I'm trying to create a new topic on our forum via GraphQL and I get the following error:

{
    "errors": [
        {
            "message": "NO_FORUM",
            "extensions": {
                "category": "clienterror"
            },
            "locations": [
                {
                    "line": 3,
                    "column": 9
                }
            ],
            "path": [
                "mutateForums",
                "createTopic"
            ]
        }
    ],
    "data": {
        "mutateForums": {
            "createTopic": null
        }
    }
}

Here's the mutator I'm sending, line 3 column 9 is the first "c" in "createTopic"

mutation MutateForums {
    mutateForums {
        createTopic(
            forumID: "125"
            title: "Blackburn Rovers Fans: Share Your Ticketing Experiences in the BRFCS Survey"
            content: "Help Us Understand Fan Experiences with Ticketing ?️"
        ) {
            id
            title
        }
    }
}

If I cut & paste that into Postman using the same auth details it works as expected & I get the ID & title back.

Posted

I think I know what the issue is, as I'm using client credentials rather than a specific users credentials I'm effectively acting as a guest, which doesn't have access to the forum in question.

Is it possible to impersonate a user? The user I want to create the post is one of our accounts rather than an actual user. A system user with the forum branding if you will.

The other option is to use resource Owner Password Credentials, but that's deprecated according to the OAuth2 spec.

  • Solution
Posted
On 12/2/2024 at 11:23 PM, Stuart Grimshaw said:

The other option is to use resource Owner Password Credentials, but that's deprecated according to the OAuth2 spec.

This is what I did in the end.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...