I have successfully configured and set my odk central instance. I want to use the API to access data from the platform. However, when I tried to authenticate the user, I am unsuccessful in getting the token.
Anytime I try, I get the response:
{
"message": "Could not authenticate with the provided credentials.",
"code": 401.2
}
Meanwhile, it is the same credentials that I use to login to the odk central on the web.
Please I need help on this issue.
In case this is of interest to you or someone else -- I was looking for a quick way to get the full Central API specification into Postman. The best I found was:
Thanks very much for helping me with the answers. I imported the central postman collection that you sent and replaced them with the right URL and the credentials. It worked for the first time. However, subsequent requests give me the same error message.
I guess my postman is sending some headers that are not supposed to be sent.
The good news is, I used PHP curl to test it directly and I got the tokens.
That's likely the third point I warned about above -- if you request a token again you have to make sure you don't send cookies. You can uncheck them as part of the request configuration.