Chatpt x Twitter 403 Code - solved

Hi folks, I’ve seen a bunch of posts with help requested to fix a 403 code on twitter. Usually related to one of the create engaging content on twitter using chatgpt templates. They seem to get closed without a resolution, or just lots of chat about the callback url.

I believe this error to be chatgpt exceeding the 280 character limit for twitter. Adding “limit your response to 260 characters” to the prompt doesn’t always work, but does reduce the error rate.

What solved it for my runs was limiting the number of tokens that chatgpt used to generate the tweet. 150 seems to work for me, but your milage may vary.