Title: Avo's Replies | WordPress.org

---

# Avo

  [  ](https://wordpress.org/support/users/avo/)

 *   [Profile](https://wordpress.org/support/users/avo/)
 *   [Topics Started](https://wordpress.org/support/users/avo/topics/)
 *   [Replies Created](https://wordpress.org/support/users/avo/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/avo/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/avo/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/avo/engagements/)
 *   [Favorites](https://wordpress.org/support/users/avo/favorites/)

 Search replies:

## Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[JWT Authentication for WP REST APIs] Status 401: You are not allowed to delete this post – BASIC](https://wordpress.org/support/topic/status-401-you-are-not-allowed-to-edit-this-post-basic/)
 *  Thread Starter [Avo](https://wordpress.org/support/users/avo/)
 * (@avo)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/status-401-you-are-not-allowed-to-edit-this-post-basic/#post-18080950)
 * Thanks for the fix. Just tested on multiple sites and it’s now working.
 * cheers, Steve
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[JWT Authentication for WP REST APIs] Status 401: You are not allowed to delete this post – BASIC](https://wordpress.org/support/topic/status-401-you-are-not-allowed-to-edit-this-post-basic/)
 *  Thread Starter [Avo](https://wordpress.org/support/users/avo/)
 * (@avo)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/status-401-you-are-not-allowed-to-edit-this-post-basic/#post-18076384)
 * I created a basic delete post script, and it works in v 3.4.0 but fails with 
   401 error in v 3.5.1
 *     ```wp-block-code
       import requestsfrom requests.auth import HTTPBasicAuth# Setup the credentials and post informationusername = "xxxxxx"app_password = "xxxxxxxxx"  # The application password generated in your profilepost_id = 905  # Replace with the post ID you want to deletebase_url = "https://xxxxxxxxxx.com"  # Replace with your site's base URL# Construct the API URLapi_url = f"{base_url}/wp-json/wp/v2/posts/{post_id}"# Send the DELETE requestresponse = requests.delete(api_url, auth=HTTPBasicAuth(username, app_password))# Check the responseif response.status_code == 200:    print(f"Post with ID {post_id} has been successfully deleted.")else:    print(f"Failed to delete post with ID {post_id}. Status code: {response.status_code}, Response: {response.text}")
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[JWT Authentication for WP REST APIs] Status 401: You are not allowed to edit this post – JWT](https://wordpress.org/support/topic/status-401-you-are-not-allowed-to-edit-this-post-jwt/)
 *  [Avo](https://wordpress.org/support/users/avo/)
 * (@avo)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/status-401-you-are-not-allowed-to-edit-this-post-jwt/#post-18076376)
 * NVM wrong topic
    -  This reply was modified 1 year, 7 months ago by [Avo](https://wordpress.org/support/users/avo/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[JWT Authentication for WP REST APIs] Test Config not working – no response](https://wordpress.org/support/topic/test-config-not-working-no-response/)
 *  Thread Starter [Avo](https://wordpress.org/support/users/avo/)
 * (@avo)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/test-config-not-working-no-response/#post-16798979)
 * re-started the server, problem solved.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Bulk Change Posts from Published to Draft Across Multiple Sites](https://wordpress.org/support/topic/bulk-change-posts-from-published-to-draft-across-multiple-sites/)
 *  Thread Starter [Avo](https://wordpress.org/support/users/avo/)
 * (@avo)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/bulk-change-posts-from-published-to-draft-across-multiple-sites/#post-12387303)
 * Thanks, so I’d need to make modifications in the class-wp-rest-posts-controller.
   php then?
 * I did add to line 1018 of that file `$prepared_post->post_status = ( $status 
   == 'publish' ) ? 'draft' : $status;` but doesn’t seem to work
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [3.0 Plugin Upgrade Bug? Could Not Create Directory](https://wordpress.org/support/topic/30-upgrade-bug-ftps/)
 *  [Avo](https://wordpress.org/support/users/avo/)
 * (@avo)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/30-upgrade-bug-ftps/#post-1540959)
 * Yes, I had same issue. I deleted the ‘upgrades’ folder, recreated and gave it
   recursive ‘777’ permissions and that solved the issue, for me at least.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Images next to Adsense in header not showing except on front page.](https://wordpress.org/support/topic/images-next-to-adsense-in-header-not-showing-except-on-front-page/)
 *  Thread Starter [Avo](https://wordpress.org/support/users/avo/)
 * (@avo)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/images-next-to-adsense-in-header-not-showing-except-on-front-page/#post-441684)
 * Thanks heaps for that info. Solved my problem perfectly.
    Good karma to you 🙂

Viewing 7 replies - 1 through 7 (of 7 total)