<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: auto password reset for guest SSID and email to users in Wireless</title>
    <link>https://community.cisco.com/t5/wireless/auto-password-reset-for-guest-ssid-and-email-to-users/m-p/5470790#M292467</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to use this script to change the password on a given Wireless SSID. I have installed the python modules: meraki &amp;amp; requests . Customized according to my ORG Info. like API_Key, Network_ID, SSID_Number&lt;/P&gt;&lt;P&gt;When I run the script, I get error as : python3 pwdmeraki.py&lt;/P&gt;&lt;P&gt;===&lt;/P&gt;&lt;P&gt;File "/home/user/Desktop/pwdmeraki.py", line 21&lt;BR /&gt;return ''.join(random.choice(character_types) for i in range(stringlength))&lt;BR /&gt;^&lt;BR /&gt;IndentationError: expected an indented block after function definition on line 20&lt;/P&gt;&lt;P&gt;===&lt;/P&gt;&lt;P&gt;The lines 19 to 22 look like&lt;BR /&gt;===&lt;BR /&gt;gmail_password = "My_Gmail_App_Password" # enter the generated gmail app password here&lt;BR /&gt;sender_email = "App_Password_User@gmail.com" # sending gmail address&lt;BR /&gt;receiver_email = "receive@gmail.com" # receiving address(es)&lt;/P&gt;&lt;P&gt;# the below two lines are line 20 and 21&lt;BR /&gt;def random_string(stringlength=password_length):&lt;BR /&gt;return ''.join(random.choice(character_types) for i in range(stringlength))&lt;/P&gt;&lt;P&gt;def set_new_psk(new_psk, ssid=ssid_number):&lt;BR /&gt;url = "&lt;A href="https://api.meraki.com/api/v0/networks/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://api.meraki.com/api/v0/networks/&lt;/A&gt;"+network_id+"/ssids/"+str(ssid)&lt;BR /&gt;payload = "{\r\n \"psk\": \""+str(new_psk)+"\"\r\n}"&lt;BR /&gt;headers = {&lt;BR /&gt;'Accept': "*/*",&lt;BR /&gt;'Content-Type': "application/json",&lt;BR /&gt;'cache-control': "no-cache",&lt;BR /&gt;'X-Cisco-Meraki-API-Key': api_key&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;===&lt;/P&gt;&lt;P&gt;How to solve this ?&lt;/P&gt;</description>
    <pubDate>Wed, 27 Nov 2024 14:35:02 GMT</pubDate>
    <dc:creator>massoo1976</dc:creator>
    <dc:date>2024-11-27T14:35:02Z</dc:date>
    <item>
      <title>auto password reset for guest SSID and email to users</title>
      <link>https://community.cisco.com/t5/wireless/auto-password-reset-for-guest-ssid-and-email-to-users/m-p/5470782#M292459</link>
      <description>&lt;P&gt;We are trying to setup a guest wifi. The requirements would be that the guest wifi password would need to change once per week. We have setup a user and assigned a password and authorized the user. we can access and login to guest ssid. The issue per-se is, can the process of changing the password weekly and emailing password to certain folk be automated? Trying to make this as hands off as possible. Thank you&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2023 14:32:16 GMT</pubDate>
      <guid>https://community.cisco.com/t5/wireless/auto-password-reset-for-guest-ssid-and-email-to-users/m-p/5470782#M292459</guid>
      <dc:creator>chris_nelson</dc:creator>
      <dc:date>2023-06-19T14:32:16Z</dc:date>
    </item>
    <item>
      <title>Re: auto password reset for guest SSID and email to users</title>
      <link>https://community.cisco.com/t5/wireless/auto-password-reset-for-guest-ssid-and-email-to-users/m-p/5470783#M292460</link>
      <description>&lt;DIV&gt;&lt;SPAN&gt;Unfortunately with the dashboard options you won't be able to do this automatically. You would need a third party solution.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;One option is to integrate with AD and on the server set a password expiration policy.&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 19 Jun 2023 14:49:41 GMT</pubDate>
      <guid>https://community.cisco.com/t5/wireless/auto-password-reset-for-guest-ssid-and-email-to-users/m-p/5470783#M292460</guid>
      <dc:creator>aleabrahao</dc:creator>
      <dc:date>2023-06-19T14:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: auto password reset for guest SSID and email to users</title>
      <link>https://community.cisco.com/t5/wireless/auto-password-reset-for-guest-ssid-and-email-to-users/m-p/5470784#M292461</link>
      <description>&lt;P&gt;If you change to using WPA2-PSK, and a splash page, you can find a lot of scripts for changing the PSK.  Google "github meraki change psk".&lt;/P&gt;&lt;P&gt;You then need to schedule the script to run weekly.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2023 20:47:48 GMT</pubDate>
      <guid>https://community.cisco.com/t5/wireless/auto-password-reset-for-guest-ssid-and-email-to-users/m-p/5470784#M292461</guid>
      <dc:creator>Philip D'Ath</dc:creator>
      <dc:date>2023-06-19T20:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: auto password reset for guest SSID and email to users</title>
      <link>https://community.cisco.com/t5/wireless/auto-password-reset-for-guest-ssid-and-email-to-users/m-p/5470785#M292462</link>
      <description>&lt;P&gt;Splash Access also offer a nice paid solution that can do this.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.splashaccess.com/portfolio/splashaccess-traditional/" target="_self" rel="nofollow noopener noreferrer"&gt;https://www.splashaccess.com/portfolio/splashaccess-traditional/&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2023 20:48:42 GMT</pubDate>
      <guid>https://community.cisco.com/t5/wireless/auto-password-reset-for-guest-ssid-and-email-to-users/m-p/5470785#M292462</guid>
      <dc:creator>Philip D'Ath</dc:creator>
      <dc:date>2023-06-19T20:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: auto password reset for guest SSID and email to users</title>
      <link>https://community.cisco.com/t5/wireless/auto-password-reset-for-guest-ssid-and-email-to-users/m-p/5470786#M292463</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;Yes, It's very much possible with the API and a python script. We have achieved the same for daily rotation and with an email having details of the rotated passwords. &lt;/P&gt;&lt;P&gt;You need to tweak the script for weekly basis. I am attaching the link with details here. &lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/1YsMqvV3MvqL0S237zWA_r3sji7bXBgWe/view?usp=drivesdk" target="_blank" rel="nofollow noopener noreferrer"&gt;https://drive.google.com/file/d/1YsMqvV3MvqL0S237zWA_r3sji7bXBgWe/view?usp=drivesdk&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2023 01:43:57 GMT</pubDate>
      <guid>https://community.cisco.com/t5/wireless/auto-password-reset-for-guest-ssid-and-email-to-users/m-p/5470786#M292463</guid>
      <dc:creator>Madhan kumar G</dc:creator>
      <dc:date>2023-06-20T01:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: auto password reset for guest SSID and email to users</title>
      <link>https://community.cisco.com/t5/wireless/auto-password-reset-for-guest-ssid-and-email-to-users/m-p/5470787#M292464</link>
      <description>&lt;P&gt;Or use a third party radius provider for a captive portal with a rotating passcode. That service will  send emails to whoever you want on what ever cycle you tell it. After its set up and for extra measure, I have a certain team recipient that  updates an announcement only mailbox that anyone can dial into that has access to our voip phones. Codes get updated at the halflife of the period you mandate so at any given time there are two valid codes. One new one and one on the way out. Anyone can call and be told the code for acces  with 5 digit dialing announcement.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2023 02:50:53 GMT</pubDate>
      <guid>https://community.cisco.com/t5/wireless/auto-password-reset-for-guest-ssid-and-email-to-users/m-p/5470787#M292464</guid>
      <dc:creator>DainBrammage</dc:creator>
      <dc:date>2023-06-20T02:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: auto password reset for guest SSID and email to users</title>
      <link>https://community.cisco.com/t5/wireless/auto-password-reset-for-guest-ssid-and-email-to-users/m-p/5470788#M292465</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Automated WPA2-PSK be achieved by API.&lt;/P&gt;&lt;P&gt;Edit the following python script as highlighted in red referring to the details.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.cisco.com/meraki/api/#!getting-started/find-your-network-id" target="_self" rel="nofollow noopener noreferrer"&gt;Get the details&lt;/A&gt; &lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;&lt;EM&gt;import meraki&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;import requests&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;import random&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;import string&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;import smtplib&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;import ssl&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;from email.mime.text import MIMEText&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;from email.mime.multipart import MIMEMultipart&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;api_key = "&lt;FONT color="#FF0000"&gt;your_api_key&lt;/FONT&gt;" # enter your meraki api key here&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;network_id = "&lt;FONT color="#FF0000"&gt;your_network_id&lt;/FONT&gt;" # enter the network id of the network you &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;want to change here&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;ssid_number = "&lt;FONT color="#FF0000"&gt;ssid_number"&lt;/FONT&gt;# enter the number of the ssid you want to change here 0 - 14&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;password_length = &lt;FONT color="#FF0000"&gt;15 &lt;/FONT&gt; # enter the desired length of the new PSK min 8 max 63&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;character_types = string.ascii_lowercase + string.ascii_uppercase + string.digits # remove or change according to needs&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;gmail_password = "&lt;FONT color="#FF0000"&gt;App_password_generated&lt;/FONT&gt;" # enter the generated gmail app password here&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;sender_email = "&lt;FONT color="#FF0000"&gt;sender@gmail.com&lt;/FONT&gt;" # sending gmail address&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;receiver_email = "&lt;FONT color="#FF0000"&gt;reciver@gmail.com&lt;/FONT&gt;" # receiving address(es)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;def random_string(stringlength=password_length):&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;    return ''.join(random.choice(character_types) for i in range(stringlength))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;def set_new_psk(new_psk, ssid=ssid_number):&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;    url = "&lt;A href="https://api.meraki.com/api/v0/networks/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://api.meraki.com/api/v0/networks/&lt;/A&gt;"+network_id+"/ssids/"+str(ssid)  #remove the spaces the I inserted to get around a community bug&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;    payload = "{\r\n    \"psk\": \""+str(new_psk)+"\"\r\n}"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;    headers = {&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;        'Accept': "*/*",&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;        'Content-Type': "application/json",&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;        'cache-control': "no-cache",&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;        'X-Cisco-Meraki-API-Key': api_key&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;    }&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;    response = requests.request("PUT", url, data=payload, headers=headers)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;    print(str(response.status_code) + " - " + response.text)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;    return(response.status_code)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;def send_password_email(new_psk_param):&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;    message = MIMEMultipart("alternative")&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;    message["Subject"] = "New Wi-Fi PSK"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;    message["From"] = sender_email&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;    message["To"] = receiver_email&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;    # Create the plain-text and HTML version of your message&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;    text = """\&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;    Hi,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;    We've changed the Wi-Fi password to: {new_psk}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;    Kind regards,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;    pskscript""".format(new_psk=new_psk_param)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;    html = """\&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;    &amp;lt;html&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;      &amp;lt;body&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;        &amp;lt;div&amp;gt;Hi,&amp;lt;br&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;           &amp;lt;br&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;           &lt;FONT color="#FF0000"&gt;We've changed the Wi-Fi password to&lt;/FONT&gt;: &amp;lt;br&amp;gt; #content to be recived&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;           &amp;lt;h1&amp;gt;{new_psk}&amp;lt;/h1&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;           Kind regards,&amp;lt;br&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;           pskscript&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;        &amp;lt;/div&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;      &amp;lt;/body&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;    &amp;lt;/html&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;    """.format(new_psk=new_psk_param)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;    # Turn these into plain/html MIMEText objects&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;    part1 = MIMEText(text, "plain")&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;    part2 = MIMEText(html, "html")&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;    # Add HTML/plain-text parts to MIMEMultipart message&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;    # The email client will try to render the last part first&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;    message.attach(part1)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;    message.attach(part2)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;    # Create secure connection with server and send email&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;    context = ssl.create_default_context()&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;    with smtplib.SMTP_SSL("smtp.gmail.com", 465, context=context) as server:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;        server.login(sender_email, gmail_password)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;        server.sendmail(&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;            sender_email, receiver_email, message.as_string()&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;        )&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;new_psk = random_string(password_length)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if set_new_psk(new_psk) == 200:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;    send_password_email(new_psk)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;“&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Schedule Python script to run weekly on some online platforms like "&lt;A href="http://www.pythonanywhere.com" target="_blank" rel="nofollow noopener noreferrer"&gt;www.pythonanywhere.com&lt;/A&gt;" or you can run the script in the internal server with using crontab.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2023 07:30:37 GMT</pubDate>
      <guid>https://community.cisco.com/t5/wireless/auto-password-reset-for-guest-ssid-and-email-to-users/m-p/5470788#M292465</guid>
      <dc:creator>Balaji RG</dc:creator>
      <dc:date>2023-06-20T07:30:37Z</dc:date>
    </item>
    <item>
      <title>Re: auto password reset for guest SSID and email to users</title>
      <link>https://community.cisco.com/t5/wireless/auto-password-reset-for-guest-ssid-and-email-to-users/m-p/5470789#M292466</link>
      <description>&lt;P&gt;Thank you all for your input. I will be looking in to the Splash Access option. Whether or not we go with this option is another thing. &lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2023 17:36:37 GMT</pubDate>
      <guid>https://community.cisco.com/t5/wireless/auto-password-reset-for-guest-ssid-and-email-to-users/m-p/5470789#M292466</guid>
      <dc:creator>chris_nelson</dc:creator>
      <dc:date>2023-06-22T17:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: auto password reset for guest SSID and email to users</title>
      <link>https://community.cisco.com/t5/wireless/auto-password-reset-for-guest-ssid-and-email-to-users/m-p/5470790#M292467</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to use this script to change the password on a given Wireless SSID. I have installed the python modules: meraki &amp;amp; requests . Customized according to my ORG Info. like API_Key, Network_ID, SSID_Number&lt;/P&gt;&lt;P&gt;When I run the script, I get error as : python3 pwdmeraki.py&lt;/P&gt;&lt;P&gt;===&lt;/P&gt;&lt;P&gt;File "/home/user/Desktop/pwdmeraki.py", line 21&lt;BR /&gt;return ''.join(random.choice(character_types) for i in range(stringlength))&lt;BR /&gt;^&lt;BR /&gt;IndentationError: expected an indented block after function definition on line 20&lt;/P&gt;&lt;P&gt;===&lt;/P&gt;&lt;P&gt;The lines 19 to 22 look like&lt;BR /&gt;===&lt;BR /&gt;gmail_password = "My_Gmail_App_Password" # enter the generated gmail app password here&lt;BR /&gt;sender_email = "App_Password_User@gmail.com" # sending gmail address&lt;BR /&gt;receiver_email = "receive@gmail.com" # receiving address(es)&lt;/P&gt;&lt;P&gt;# the below two lines are line 20 and 21&lt;BR /&gt;def random_string(stringlength=password_length):&lt;BR /&gt;return ''.join(random.choice(character_types) for i in range(stringlength))&lt;/P&gt;&lt;P&gt;def set_new_psk(new_psk, ssid=ssid_number):&lt;BR /&gt;url = "&lt;A href="https://api.meraki.com/api/v0/networks/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://api.meraki.com/api/v0/networks/&lt;/A&gt;"+network_id+"/ssids/"+str(ssid)&lt;BR /&gt;payload = "{\r\n \"psk\": \""+str(new_psk)+"\"\r\n}"&lt;BR /&gt;headers = {&lt;BR /&gt;'Accept': "*/*",&lt;BR /&gt;'Content-Type': "application/json",&lt;BR /&gt;'cache-control': "no-cache",&lt;BR /&gt;'X-Cisco-Meraki-API-Key': api_key&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;===&lt;/P&gt;&lt;P&gt;How to solve this ?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2024 14:35:02 GMT</pubDate>
      <guid>https://community.cisco.com/t5/wireless/auto-password-reset-for-guest-ssid-and-email-to-users/m-p/5470790#M292467</guid>
      <dc:creator>massoo1976</dc:creator>
      <dc:date>2024-11-27T14:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: auto password reset for guest SSID and email to users</title>
      <link>https://community.cisco.com/t5/wireless/auto-password-reset-for-guest-ssid-and-email-to-users/m-p/5470791#M292468</link>
      <description>&lt;P&gt;These bits should be indented.&lt;/P&gt;&lt;PRE class="lia-code-sample language-python"&gt;&lt;CODE&gt;def set_new_psk(new_psk, ssid=ssid_number):
   url = "https://api.meraki.com/api/v0/networks/"+network_id+"/ssids/"+str(ssid)
   payload = "{\r\n \"psk\": \""+str(new_psk)+"\"\r\n}"
   headers = {
      'Accept': "*/*",
      'Content-Type': "application/json",
      'cache-control': "no-cache",
      'X-Cisco-Meraki-API-Key': api_key
   }&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Nov 2024 19:23:21 GMT</pubDate>
      <guid>https://community.cisco.com/t5/wireless/auto-password-reset-for-guest-ssid-and-email-to-users/m-p/5470791#M292468</guid>
      <dc:creator>Philip D'Ath</dc:creator>
      <dc:date>2024-11-27T19:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: auto password reset for guest SSID and email to users</title>
      <link>https://community.cisco.com/t5/wireless/auto-password-reset-for-guest-ssid-and-email-to-users/m-p/5470792#M292469</link>
      <description>&lt;P&gt;With proper / correct &lt;SPAN&gt;indented&lt;/SPAN&gt;, now I get &lt;/P&gt;&lt;P&gt;&amp;lt;title&amp;gt;Page not found - Cisco Meraki&amp;lt;/title&amp;gt;&lt;/P&gt;&lt;P&gt;Looks like none of the below work for querying the Meraki_API_URL's&lt;/P&gt;&lt;P&gt;"&lt;A href="https://api.meraki.com/api/v0/organizations/ORG_ID/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://api.meraki.com/api/v0/organizations/ORG_ID/&lt;/A&gt;"&lt;BR /&gt;"&lt;A href="https://api.meraki.com/api/v1/organizations/ORG_ID/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://api.meraki.com/api/v1/organizations/ORG_ID/&lt;/A&gt;"&lt;/P&gt;&lt;P&gt;"&lt;A href="https://n290.meraki.com/api/v0/organizations/ORG_ID/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://n290.meraki.com/api/v0/organizations/ORG_ID/&lt;/A&gt;&amp;gt;"&lt;BR /&gt;"&lt;A href="https://n290.meraki.com/api/v1/organizations/ORG_ID/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://n290.meraki.com/api/v1/organizations/ORG_ID/&lt;/A&gt;&amp;gt;"&lt;/P&gt;&lt;P&gt;"&lt;A href="https://dashboard.meraki.com/api/v0/organizations/ORG_ID/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://dashboard.meraki.com/api/v0/organizations/ORG_ID/&lt;/A&gt;"&lt;BR /&gt;"&lt;A href="https://dashboard.meraki.com/api/v1/organizations/ORG_ID/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://dashboard.meraki.com/api/v1/organizations/ORG_ID/&lt;/A&gt;"&lt;/P&gt;&lt;P&gt;Puzzled !!!!&lt;/P&gt;</description>
      <pubDate>Thu, 28 Nov 2024 04:16:19 GMT</pubDate>
      <guid>https://community.cisco.com/t5/wireless/auto-password-reset-for-guest-ssid-and-email-to-users/m-p/5470792#M292469</guid>
      <dc:creator>massoo1976</dc:creator>
      <dc:date>2024-11-28T04:16:19Z</dc:date>
    </item>
  </channel>
</rss>

