Skip to content

Urgent Help Needed: API Working in Postman but Failing in Glific #63

@akanshaaa19

Description

@akanshaaa19

Summary

GitHub Issue Summary

Problem Statement: API request works in Postman but returns a "parameter missing" error in Glific.

Expected Result: The API should return a successful response (200-299 status code) with the same parameters used in Postman.

Actual Result: Received a "parameter missing" error, specifically:
TypeError: start_quiz() missing 3 required positional arguments: 'student_id', 'course_level', and 'quiz_id'.

Error Message:

{"exception":"TypeError: start_quiz() missing 3 required positional arguments: 'student_id', 'course_level', and 'quiz_id'","exc":"[\"Traceback (most recent call last):\\n  File \\\"apps/frappe/frappe/app.py\\\", line 103, in application\\n    response = frappe.api.handle()\\n  ..."]}

Reproduction Steps:

  1. Send a POST request to https://lms.evalix.xyz/api/method/tap_lms.summer_program.student_progression_sp.start_quiz in Postman with the following body:
    {
      "student_id": "ST00000206",
      "course_level": "Level 1-Arts-C0070",
      "quiz_id": "QUIZ-MATH-W2-Basic"
    }
  2. Include the following authentication headers:
    authorization: token xxxx
    Accept: application/json
    
  3. Verify the response in Glific with the same parameters.

Notes: The error seems to indicate that the parameters are not being correctly passed in the API request when called from Glific. Further investigation may be needed to check how Glific handles parameter transmission compared to Postman.

Source

Original message

Hi <@1132952719586492478> ,
There is one API that we have built. When I use this API in Postman and send the request, it gives the proper response. However, when I use the same API in Glific with the exact same parameters, it shows a “parameter missing” error.
I am passing the exact same parameters that I am using in Postman, so I’m not sure what is causing the issue.

Could you please help me identify and fix this?

This is a priority task, so it would be really helpful if you could assist as soon as possible.

**Flow name:**SummerProgram2026_QuizStart
Error: Did not return a 200..299 status code{"exception":"TypeError: start_quiz() missing 3 required positional arguments: 'student_id', 'course_level', and 'quiz_id'","exc":"["Traceback (most recent call last):\n File \"apps/frappe/frappe/app.py\", line 103, in application\n response = frappe.api.handle()\n File \"apps/frappe/frappe/api.py\", line 55, in handle\n return frappe.handler.handle()\n File \"apps/frappe/frappe/handler.py\", line 50, in handle\n data = execute_cmd(cmd)\n File \"apps/frappe/frappe/handler.py\", line 85, in execute_cmd\n return frappe.call(method, **frappe.form_dict)\n File \"apps/frappe/frappe/init.py\", line 1628, in call\n return fn(*args, **newargs)\nTypeError: start_quiz() missing 3 required positional arguments: 'student_id', 'course_level', and 'quiz_id'\n"]"}

Full thread transcript

himani_19523: Hi <@1132952719586492478> ,
There is one API that we have built. When I use this API in Postman and send the request, it gives the proper response. However, when I use the same API in Glific with the exact same parameters, it shows a “parameter missing” error.
I am passing the exact same parameters that I am using in Postman, so I’m not sure what is causing the issue.

Could you please help me identify and fix this?

This is a priority task, so it would be really helpful if you could assist as soon as possible.

**Flow name:**SummerProgram2026_QuizStart
Error: Did not return a 200..299 status code{"exception":"TypeError: start_quiz() missing 3 required positional arguments: 'student_id', 'course_level', and 'quiz_id'","exc":"["Traceback (most recent call last):\n File \"apps/frappe/frappe/app.py\", line 103, in application\n response = frappe.api.handle()\n File \"apps/frappe/frappe/api.py\", line 55, in handle\n return frappe.handler.handle()\n File \"apps/frappe/frappe/handler.py\", line 50, in handle\n data = execute_cmd(cmd)\n File \"apps/frappe/frappe/handler.py\", line 85, in execute_cmd\n return frappe.call(method, **frappe.form_dict)\n File \"apps/frappe/frappe/init.py\", line 1628, in call\n return fn(*args, **newargs)\nTypeError: start_quiz() missing 3 required positional arguments: 'student_id', 'course_level', and 'quiz_id'\n"]"}

sangeetamishra._91310: <@722313444325457921> Could you pelase take a look at it ?

mdshamoon: Where is the api app hosted

mdshamoon: <@1206187926912765952>

mdshamoon: Its returning 400 means an auth error. Are you adding any auth headers

himani_19523: <@722313444325457921> yes

mdshamoon: can you sahre the curl request for thsi from postman

himani_19523: <@722313444325457921>

**POST: **https://lms.evalix.xyz/api/method/tap_lms.summer_program.student_progression_sp.start_quiz

**Body: **
{
"student_id": "ST00000206",
"course_level": "Level 1-Arts-C0070",
"quiz_id": "QUIZ-MATH-W2-Basic"
}

Auth:
authorization: token f2439dfce11b1ee:db4c9aa4ecb9e19
Accept: application/json

himani_19523: <@722313444325457921> any idea how to fix it

sangeetamishra._91310: <@598942390539124746> Can you please take this ahead.

iamloak: We are looking into this, will update here once I find some details

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    To Do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions