Forum Discussion
Hi allensmith81 , while coAuthors is a valid input for creating blog articles, it doesn't appear that our GraphQL currently includes an input field to set the original author.
One potential work-around, if you're using API v1 Authentication there's a way to essentially "switch users" via API. This allows a user with admin permissions to obtain an API session key for another user.
You do this by passing in the desired user via the user.login parameter, and making the request with an admin user session key. This should return a session key for the user specified via user.login. If you're not familiar with API V1 Authentication, more details here: https://developer.khoros.com/khoroscommunitydevdocs/docs/session-key#retrieve-the-session-key
This article in our Dev Docs gives a more detailed example of how this works for obtaining the session key: https://developer.khoros.com/khoroscommunitydevdocs/docs/create-subscriptions-for-another-user#example
Once you have the session key for the desired user, you can then make the GraphQL call to create the blog article using the API v1 session key for that user, passing it into the request via the li-api-session-key request header.
I hope this helps!
AdamN Thanks I already know of this way - having been using the API since we moved Skype to the platform in 2010 - I am very experienced at APIs and breaking the platform in ways it was never supposed to be :P
I would still like to see an API call I can make without the extra trip through the login flow to create a blog post on behalf of another user.
A north star would be it's possible for a community member to create 'delegated' authors for any blog they are permissioned to write and the delegated user could then create a post and select the author from a drop down list of users they are 'delegate' for. Maybe with some sort of 6 monthly automatic review requiring the user who granted the delegated permissions to confirm they wish them to continue.