coursera-dl icon indicating copy to clipboard operation
coursera-dl copied to clipboard

Error 403 Client Error: Forbidden for url: https://api.coursera.org/api/memberships.v1?includes=courseId,courses.v1&q=me&showHidden=true&filter=current,preEnrolled getting page https://api.coursera.org/api/memberships.v1?includes=courseId,courses.v1&q=me&showHidden=true&filter=current,preEnrolled The server replied: {"errorCode":"Not Authorized","message":null,"details":null} HTTPError 403 Client Error: Forbidden for url: https://api.coursera.org/api/memberships.v1?includes=courseId,courses.v1&q=me&showHidden=true&filter=current,preEnrolled

Open ghost opened this issue 3 years ago • 4 comments

https://github.com/coursera-dl/coursera-dl/issues/800#issuecomment-870953541

Here is a fix to this issue but I could not really understand it as I am not good tech person..

Subject of the issue

Describe your issue here.

Your environment

  • Operating System (name/version):
  • Python version:
  • coursera-dl version:

Steps to reproduce

Tell us how to reproduce this issue, please don't forget to include enough information so that you can help us help you:

  • Is the problem happening with the latest version of the script?
  • Do you have all the recommended versions of the modules? See them in the file requirements.txt.
  • What is the course that you are trying to access?
  • cryptography I
  • What is the precise command line that you are using (don't forget to obfuscate your username and password, but leave all other information untouched). coursera-dl crypto
  • What are the precise messages that you get?

Error 403 Client Error: Forbidden for url: https://api.coursera.org/api/memberships.v1?includes=courseId,courses.v1&q=me&showHidden=true&filter=current,preEnrolled getting page https://api.coursera.org/api/memberships.v1?includes=courseId,courses.v1&q=me&showHidden=true&filter=current,preEnrolled The server replied: {"errorCode":"Not Authorized","message":null,"details":null} HTTPError 403 Client Error: Forbidden for url: https://api.coursera.org/api/memberships.v1?includes=courseId,courses.v1&q=me&showHidden=true&filter=current,preEnrolled

Expected behaviour

Cryptography I course should be downloaded.

Actual behaviour

Error message shown above occurs.

ghost avatar Nov 29 '21 14:11 ghost

I had the same error. What I did was to copy the cauth value again and change it in the coursera-dl.conf file and with that I could download my course. I think this value changes constantly as it was different from the one I previously used to download another course.

I've been getting the cauth value this way (using Microsoft Edge, I don't know if it is diferent in other browsers):

  1. Log into your coursera account
  2. While being on the dashboard right click and choose Inspect
  3. Go to the Aplications tab
  4. Click the https://www.coursera.org/ option under the Cookies section
  5. Write Cauth in the search tab
  6. Copy the cauth value

Gabrielgr01 avatar Dec 14 '21 23:12 Gabrielgr01

I've tried this, but it's still not working after using Cauth value.

krj29b avatar May 09 '22 20:05 krj29b

same here. Worked fine for some courses, doesn't on a lot of them

JohannCR avatar Jul 05 '22 08:07 JohannCR

same here.

huggiebao2 avatar Nov 21 '22 03:11 huggiebao2