API key generation ; Record {'status': {'code': 11102, 'description': 'Invalid request', 'details': 'Malformed or invalid request'}}

  1. Describe the issue briefly
    Is there possibly a way to know how to exactly generate the API key precisely. I have done rest of the milestones, I’'m facing the above error.
  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)
    More Than an Hour
  3. What is your hypothesis?

Hey, you need to pass data as json.

I have done all that. Is the API key what we find below first-applications-all-scopes under API KEYS in our account?

does that mean pass it to the requests. post method as json?

Look at this documentation

https://docs.clarifai.com/

yes, check this https://docs.clarifai.com/api-guide/predict

Yes, that is right! Your format is wrong, if you are using CURL in Postman, check if the format you have chosen is as mentioned in the docs

I am also getting the same error. I have converted my curl command to python request and has also updated the access _token file with the clarifai api but still it’s throwing an error.

How are you converting data to json format ?

json_data = json.loads(response.text)

not this, while making the post request, you need to send data in json format. how are you doing this?

we need to send the data attribute as json or header as json?

@mukulvashishtha What about authorization key then? That must also be present in this json right?

@disha we might have to disqualify you for violating our community guidelines and sharing solution code in a public forum. We have clearly stated in the kickoff call that this will not be tolerated. If you can’t follow simple instructions like this, there is no point in continuing further.

@mukulvashishtha we might have to disqualify you for violating our community guidelines and sharing solution code on a public forum. We have clearly stated in the kickoff call that we won’t tolerate such things. If you can’t follow simple instructions, then there is not point in continuing.

@ajay-crio that was not a solution. One has to think a lot about how to convert data to JSON, how to pass them as JSON in the request, how to convert response object to JSON, and then how to get the required answer. If that was a solution, no one would ask more questions after that, still, they are not able to solve this. That was just a hint, which is visible in the link shared by your team. I just highlighted the hint. I have not given them the exact solution. The exact solution was more difficult than this hint. Everyone knows this code, they are not able to convert it to python.

no, check this link. https://docs.clarifai.com/api-guide/predict

1 Like

Got it @mukulvashishtha !
@ajay-crio
@gouravsardana
@Saurabh_Crio_TA
When are we getting the badges?

Extremely Sorry, Sir @ajay-crio , Won’t be repeated again. Will keep this in min. Was a mistake on my part