Unauthorized for this resource scope

https://api.codechef.com/todo/problems/

curl -X GET “https://api.codechef.com/todo/problems?fields=

fields is an optional parameter right ? and even in the documentation it is given that it takes no paramter

and even if i want to set field paramter then how can i set ?
fields=
give an example pls: with problemCode,contestCode
Yet i’m getting

{
“status”: “error”,
“result”: {
“errors”: [
{
“message”: “Unauthorized for this resource scope”,
“code”: “unauthorized”
}
]
}
}

And once the user logs in our web is it possible that next time the chef remember the app as allowed (like in google once user gives permission to the app it doesn’t ask next time we login in using the google account )

@princekm,

  1. Possible fields for “fields” parameter for https://api.codechef.com/todo/problems/ api are: problemCode, contestCode, creationTime, status, tags, problemName, contestUrl, problemUrl, problemRedirect. Multiple fields can be entered using comma.

You can find all this information in developer’s console.

  1. You can use refresh token whose validity is for 14 days. You can request a new access token refresh token before the expiry of old access token and keep the user logged in.

@shivangi_gupta why can’t we use PRACTICE as a value for field parameter contestCode? When I set contestCode as PRACTICE, I get the following message

{“status”:“OK”,“result”:{“data”:{“message”:“no submissions found for this search”,“code”:9003}}}

And when I don’t use the field parameter contestCode, I get the details of the submissions which have “contestCode”:“PRACTICE” as one of their content.

Hey, you can try this and let us know if you are still facing the same issue.

Can you give an example with complete url how you’ve incorporated the fields I tried all possible combinations I could think of. And there isn’t any API to fetch a complete list of todos right.

//