Unable to access posts as a User

Hey there, I have an endpoint I’m trying to access as a user to get some post data back.

I’m hitting this endpoint https://www.patreon.com/api/oauth2/v2/posts/${postId}?fields${encodeURIComponent("[post]")}=content,title,url,embed_data,embed_url,tiers,published_at

When I’m signed into my account (creator of Campaign) I can get the post data fine. However when signed in to a user account I was get nothing back.

I realized I needed to adjust the scopes and added campaigns and campaigns.posts to my login.

After updating the scopes, I now get this error on the user account:

  errors: [
      code: 6,
      code_name: 'ViewForbidden',
      detail: 'You do not have permission to view post with id 81247647.',
      id: '6444a9b0-5568-519f-9ca5-c0e5d642d69e',
      status: '403',
      title: 'You do not have permission to view this post.'

I’ve tried making the posts public, I’m also subscribed to the correct tier on the user account, and am still getting the error.

You can only get the posts of someone who has authorized a token with posts scope, and only when using the token. So you need to use your creator token to get your own posts.

The creator token resets though, so what would be the best way to keep posts updated?

I was thinking of using the creator token to get all the posts once and then storing that in a database and then using webhooks to update the DB on new posts. Does that seem like an efficient way of using the API for getting posts? I can’t seem to think of another way.

If you go through the flow as a user, the creator token would get reset. This is a current issue with the api. Until that is addressed you will need to save the creator scoped token somewhere else and the user scoped token somewhere else.