title: 401 HTTP Response, when I load client secret and client-ID from praw.ini
body: <p>Recently, I started a PRAW project aiming to scrape from the r/todayilearned subreddit. Browsing through the docs, if found that the best way to load up the client-id, client secret, username, and password was to store it in the praw.ini file.</p>
  <p>This is the format I used where the &quot;..........&quot; were filled by the respective inputs.</p>
  <pre><code>[TIL]
  client_id=&quot;´............&quot;
  client_secret=&quot;............&quot;
  password=&quot;............&quot;
  username=&quot;..........&quot;
  user_agent=&quot;TIL by u/........&quot;
  </code></pre>
  <p>I executed this code and I get</p>
  <pre><code>import praw
  
  reddit = praw.Reddit(&quot;TIL&quot;)
  subreddit = reddit.subreddit('learnpython')
  
  </code></pre>
  <pre><code>Traceback (most recent call last):
    File &quot;C:\Users\HP\Desktop\python\TIL\src\main.py&quot;, line 7, in &lt;module&gt;
      for submission in subreddit.get_hot():
    File &quot;C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\praw\models\reddit\base.py&quot;, line 34, in __getattr__
      self._fetch()
    File &quot;C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\praw\models\reddit\subreddit.py&quot;, line 584, in _fetch
      data = self._fetch_data()
    File &quot;C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\praw\models\reddit\subreddit.py&quot;, line 581, in _fetch_data
      return self._reddit.request(&quot;GET&quot;, path, params)
    File &quot;C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\praw\reddit.py&quot;, line 849, in request
      return self._core.request(
    File &quot;C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\prawcore\sessions.py&quot;, line 328, in request
      return self._request_with_retries(
    File &quot;C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\prawcore\sessions.py&quot;, line 226, in _request_with_retries
      response, saved_exception = self._make_request(
    File &quot;C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\prawcore\sessions.py&quot;, line 183, in _make_request 
      response = self._rate_limiter.call(
    File &quot;C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\prawcore\rate_limit.py&quot;, line 33, in call
      kwargs[&quot;headers&quot;] = set_header_callback()
    File &quot;C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\prawcore\sessions.py&quot;, line 281, in _set_header_callback
      self._authorizer.refresh()
    File &quot;C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\prawcore\auth.py&quot;, line 379, in refresh
      self._request_token(
    File &quot;C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\prawcore\auth.py&quot;, line 155, in _request_token    
      response = self._authenticator._post(url, **data)
    File &quot;C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\prawcore\auth.py&quot;, line 38, in _post
      raise ResponseException(response)
  prawcore.exceptions.ResponseException: received 401 HTTP response
  </code></pre>
  <p>But, when I do this, It works.</p>
  <pre><code>import praw
  
  reddit = praw.Reddit(
  client_id=&quot;´............&quot;,
  client_secret=&quot;............&quot;,
  password=&quot;............&quot;,
  username=&quot;..........&quot;,
  user_agent=&quot;TIL by u/........&quot;
  )
  
  subreddit = reddit.subreddit('learnpython')
  
  </code></pre>
  <p>How can I fix this?
  Thanks in Advance.</p>