I think i have an issue with formatting headers for the request

  1. Describe the issue briefly
    400
    {‘status’: {‘code’: 11102, ‘description’: ‘Invalid request’, ‘details’: ‘Malformed or invalid request’}}
    None
    getting this kind of error fixing the header
  2. How much time have you spent debugging this issue?
    (Please spend at least 15 minutes to resolve the issue on your own before posting a new topic here)
    2 hours
  3. What is your hypothesis?
    I am not getting the correct way to get to represent the header

Make sure you are using the correct format for requests also check if you are using this URL for your model.

I’m using that same code (in cURL) which was given in this link with my API key but it is giving me 400 (bad request).

I’m trying this from last night.

Make sure you are passing the parameters in a correct format.
Check the params in postman app and keep doing hit and trial.

I tried almost everything used the same cURL which was written in the documentation. But that is also not working for me. There are only two parameters in the header I’m passing that. Giving 11102 msg : Please provide an API key or session token.

I have the same problem. Getting a malformed request error

@Kush_Crio_TA please see to this matter

We can’t find your commit, make sure you ran the git commands.

You guys are not passing the parameters in the correct format.
First try doing it with Postman, if successful then analyze the parameters and then start coding.
The way you are passing API key is not correct.
Keep trying.

1 Like

Thank you for the response. One question, shouldn’t the key be passed in the header?

I ran the commit for submitting module 3. Now I’m at the beginning of module 4. Where I’m checking API using POSTMAN. I tried to pass Authorization in params, in the header. followed same cURL code which was written in the documentation

every time I’m getting

“details”: “Empty or malformed authorization header. Please provide an API key or session token.”

Import the cURL code in postman to get some hints.

Done that 100 of times then also it is showing same thing :no_mouth:

Make sure you are passing the correct parameters.
Tip: Check the key in Authorization.

Same error and same issue

Checked it. I am printing it. It seems fine.

I have done the same on postman and its working there thats why i am asking whats the format for giving the header , as they are working pretty fine with post man but not python

Can i make a commit so that you can help me out with the issue , because what is see is a problem with header or something else?

@Animesh
You are not supposed to return response.
You need to parse it and then return a list of tags provided by the Clarifai API.
Also, check your TODO in views.py file.

@manishmj9431
You are not passing the parameters in the correct format.
If you made it work in Postman then compare your current code to the format in postman.
I did give a tip to akash check above.