Hello. I am a Twitter Developer, hoping to create a Twitter.Bot. We have decided to do this development in Python. In doing a Pyton tutorial today, I got the error message 453, that informed me that I had to have Twitter Developer Access raised from Read only to Read/Write. I went to my Developer Account, and brought up my project whose App ID is 25432841 and in the Setup changed the Access to Read/Write for the project. However, even though it appeared to me that that elevation to Read/Write access was approved, returning to my development and continuing my testing of the development, once again I got the same 453 Error, telling me I had insufficient access rights. Does my request for Read/Write privileges require time to be approved by others, or if that requested has been successfully accomplihsed by my application, how many hours or days will I have to waith to be able to proceed and be allowed that Read/Write access, and no longer receive this 453 Error message. A response to my question would be appreciated so we can continue with our development.

After you change the permissions from read to read/write in the developer portal, you need to recreate the access tokens you are using to call the API, so that they get the new permissions.

This is different in v2 with OAuth 2 (which we recommend), because you set the permissions you want as part of the access grant when you call the OAuth endpoint, specifying that you want (in your case) tweet.read, tweet.write, and users.read to post a Tweet.

Dear Andy:

Thank you very much.

Right now it is 8:30 PM at night in Philippines.

After a night’s sleep, my husband will be on this again in about 8 hours. I hope your suggestion works. It appears to have great authority, experience, and is very specific.

We are now very optimistic. If I have some other questions, could I write you back. You are being right now very helpful.

Sincerely,

Ghie

Dear Andy Piper:

Thank you for directions and suggestions.

Unfortunately, this did not solve the problem. You will see below the Settings screen for the project. Now, having regenerated the Access keys today, and replaced the now prior keys in the application, when I go to write, this error message still displays:

403 Forbidden

453 - You currently have Essential access which includes access to Twitter API v2 endpoints only. If you need access to this endpoint, you’ll need to apply for Elevated access via the Developer Portal. You can learn more here: Getting Started with the Twitter API | Docs | Twitter Developer Platform

Just to make sure I didn’t make a mistake, I regenerated the keys TWICE this morning, and re-tried the application which still gives the above error messages. I even restarted Visual Studio, where I am doing my Python development and re-booted the computer. Nothing worked. The error message still displays even though the Access Keys are now identified on this Settings page as Read and Write now with today’s date.

Please help. I need to get this working. I’m losing time, and this has to get done. Please reply and directed me as to what should be the next step to get beyond this issue.

Sincerely,

Pastor Burt

Dear Andy Piper:

Thank you for directions and suggestions.

Unfortunately, this did not solve the problem. You will see below the Settings screen for the project. Now, having regenerated the Access keys today, and replaced the now prior keys in the application, when I go to write, this error message still displays:

403 Forbidden
453 - You currently have Essential access which includes access to Twitter API v2 endpoints only. If you need access to this endpoint, you’ll need to apply for Elevated access via the Developer Portal. You can learn more here: Getting Started with the Twitter API | Docs | Twitter Developer Platform

Just to make sure I didn’t make a mistake, I regenerated the keys TWICE this morning, and re-tried the application which still gives the above error messages. I even restarted Visual Studio, where I am doing my Python development and re-booted the computer. Nothing worked. The error message still displays even though the Access Keys are now identified on this Settings page as Read and Write now with today’s date.

Please help. I need to get this working. I’m losing time, and this has to get done. Please reply and directed me as to what should be the next step to get beyond this issue.

Sincerely,
Pastor Burt

It looks like you are using code or a library that makes calls to the old v1.1 API, which requires applying for elevated access - instead of the new v2 API for which you do have access.

Dear Andy Piper:

Thank you for directions and suggestions.

Unfortunately, this did not solve the problem. You will see below the Settings screen for the project. Now, having regenerated the Access keys today, and replaced the now prior keys in the application, when I go to write, this error message still displays:

403 Forbidden
453 - You currently have Essential access which includes access to Twitter API v2 endpoints only. If you need access to this endpoint, you’ll need to apply for Elevated access via the Developer Portal. You can learn more here: Getting Started with the Twitter API | Docs | Twitter Developer Platform

Just to make sure I didn’t make a mistake, I regenerated the keys TWICE this morning, and re-tried the application which still gives the above error messages. I even restarted Visual Studio, where I am doing my Python development and re-booted the computer. Nothing worked. The error message still displays even though the Access Keys are now identified on this Settings page as Read and Write now with today’s date.

Please help. I need to get this working. I’m losing time, and this has to get done. Please reply and directed me as to what should be the next step to get beyond this issue.

Sincerely,
Pastor Burt

I did what you suggested. I even sent in a line by line analysis of my small sample bot, but I have no response. I am here waiting for an answer. Changing the secrets you suggested accomplished nothing. I did it several times, saved the new values, but the code I sent you continues to exception out in the same way. Please have one of your experienced support people, analyse why I still have no Write priviledges even though my account now states that I have such privileges. If you can fix what is wrong, I would really appreciate that.

Dear Igor Brigadir:

Wow, thank you very much. That indeed could make a lot of sense.

OK, so my problem was that I was emulating a code standard no longer supported in the V2 API. Forgive me. I’m trying to learn by emulating tutorials on the Internet, and of course they could be out of date. However, what I have been looking at is only 1 or 2 years old, so I thought I was safe.

Igor, what I need THE Python Language Reference Manual acceptable to Twitter V2 API. If someone could just point me to that, I will devour it into my being

Secondly Igor, where can I find then some tutorials written in Python that adhere to this Twitter V2 API. For me, all programming languages are the same, but only differ in syntax. I am hoping to find an Python tutorial example that creates a bot. Once I have this, I can start coding. I can follow and replicate the example to create a bot.

This is what I would like to do. I want to create a bot which will publish a Tweet. Here are objectives of that bot:

(1) Establish the API environment.

(2) Instead of passing parameters, I want this bot to simply get the parameters from a table like this:
all_parameters = open(‘parameterdata’,‘r’).read().splitlines
video_title = all_parameters(0);
video_URL = all_parameters(1);
author_name = all_parameters(2);

Now, Igor I don’t know if the lines of code I just wrote are V1 or V2 API, so just accept it as pseudo code.

Then I want to process these steps:

(1) Create and display an Image Card: I need to do all this in the V2 syntax. Look I really know nothing of V1 vs V2, because I have not used either. But my intent is to display first a nice header image, the width of Twitter likely 500x90px in size, as a standard header. I would like to use *.gif, because then it can be quietly animated.

def generate_card(data):
pic = Image.Open(“Header.gif”.resize((500,90), Image.ANTIALIAS))
return pic

(2) Display withing the Tweet the Video_title plus at the end the word “ by: “ and the publisher’s name.

(3) Create now a Player.Card, and display the video using the video_URL parameter.

(4) Create a Branch Button, entitled “More …”, that will take the user to FreeUkraine.Gives for ‘more” videos.

If the user, clicks the video, then they see it. Alternately, I could display just a large thumbnail of the video, which if clicked would then take the visitor back to FreeUkraine.Give to see the video in a beutiful elegant Window. With this alternate approach, I then would not need the “More…” button because once the user saw and finished his first video, suddenly he would find himself already in the midst of thousands of the same high quality all pertaining to Ukraine, the news, and how to stop this war.

This is the sum total of Player Card to play the video, if the Tweet does not automatically first send them to FreeUkraine.Gives to immediately display the video (far better a display of the video that they would otherwise see anywhere)…

I will use this bot at FreeUkraine.Gives to create a Tweeter bach in the morning and evening batch for each new news video published by FreeUkraine.gives. during those 12 hour periods of time.

These Tweets will be created twice daily at 6AM and 6PM. The batch program that will create the list for either batch will be a Winforms program, that will write out the “all_parameters” file for each video one at a time. Having written out this file, the WinForms program will then call a Process, which will then run the Python bot for each video.

In this way, a Tweet will be created for each video, where users can click the “More…” button to discover and bring them back to FreeUkraine.Gives (if they are not already there), the news website where they can then discover 10s of 1000s of other Ukraine news videos, likely 150 posted each and every day… The intent then of the bot will be to bring traffic to the FreeUkraine.Gives web site and raise awareness.

This is my whole intent, to create a bot that will advertise high quality news videos of what is going on in Ukraine, and produce a market of visitors who will come back to this website for their news once or twice a day.

Please if someone would please direct me to a (1) Twitter API V2 Python Language Reference Manual and to (2) a Twitter bot examples API V2 compliant, I will be one happy programmer.

Why do this, or why am I doing this? We are trying to raise awareness world wide (1) to stop a war in Ukraine, and more importantly (2) stop a likely nuclear exchange which will produce WWII and Armageddon. More than a million Ukraine have already died, but if we do nothing then list of victums could be indeed 7 billion souls, the entire human population of earth. We must do this. I have to do this. I am a priest of God, and has assigned me this project to be of help to all of us. We owe it to ourselves, and all humanity. So, if you will kindly advise me on this, I can create my bot, and together we will be saving many lives, maybe even our own. Please help me. I just need a little technical advice in how to write a Twitter bot. For God’s sake and yours
, please help.

Sincerely,

Pastor Burt

Dear Andy:

I amd my husband Pastor Burt are continuing to work on Python and Twitter development. We’re learning. Thank you for your assistance up to now.

May I ask another question. My husband is the programmer. He has run into another issue. in programing in Python, and Twitter bots and making progress. We now have Read and Write permissions access. But today he discovered that now the project need the more complex Read and Write permissions that includes Messageing, that that we did did not earlier select.

We are left to wonder how we may re-select this more complex version of Read/Write with Messaging. On the Projects Keys and tokens page, there is no Edit button to change this availability of that asset in the project. However, there is a Revoke button across from the status which say “Created with Read and Write”.

If we click that Revoke button to remove the Read and Write access back to just read, will another button appear to allow me to reselect the Read and Write Access but this time with Messages???

If there is NO ability to re-set this Write Access to include Messages, does it follow that we will have delete or abandon this project and start all over simply to get Massaging within Access for the project?

Or is it that the ability to change and get this 2nd level of Write access with Messages has to be approached on another page. If that is the case, please advise the URL that we should go to for re-selecting the Write Access to include Messages.

Please reply. Thank you in advance for your reply. We appreciate very much your willingness to advise