Contentful logo

Contentful Community

Management SDK Tokens

Hi. I have a js API that accepts contentful webhooks and uses the js sdk to interact with Contentful entries. We need to be able to update some contentful entries, so we created a Personal access token. The problem is that it now seems like my user (the user who was logged in when we created the token) was making the edits. I’ve seen some people throw around using Oauth tokens, but I can’t figure out out to set it up for the life of me. Seems like it needs a redirect url, but I’m not sure what that should be. The UI seems to imply it isn’t required as there isn’t an asterisk denoting the field as required, but the request fails with that field left empty. I’m also not sure if oauth tokens would even work with using the sdk. Thanks for your help!

OAuth is usually used when building a public integration, you could know whether it suits your case by reading: https://www.contentful.com/developers/docs/extensibility/oauth/

A instant workaround is to create a new user with a shared account (i.e. robot@yourcompany.com), generate Personal access token in this account, in this way the editor will show as “Robot”, would this work?