Using Insomnia retrieving all submissions is not an issue.
In VBA however, I get this error: "... does not have rights..." (see below)
The user has the administrator-role.
Now I take it it would be better to use a Bearer-Token. But cannot seem to figure out how to.
Would you be able to provide an example on how to retrieve a token in GET or in POST format?
Hi Hélène
Thank you for swift answering.
I did read that doc, of course. However, I still cannot figure out how to obtain a Session-Bearer-Token. I'm lost.
In a Nutshell: I need an action (POST or GET) which returns the token, which I then can use in the next call's header as described:
"supply it in a request header Authorization with a value of Bearer {token}"
{
"message": "Invalid input data type: expected 'Authenticate' to be (integer)",
"code": 400.11,
"details": {
"value": "Authenticate",
"expected": "integer"
}
}
I tried POST as well, having
{"email":"me@mail.ch","password":"aSecret"} in the body.
The important part is missing in the document you mentioned.
supply it in a request header Authorization with a value of Bearer {token}, as seen here.
??????!
(There is not really anything at /v1/example.....
Again, I can retrieve all data (submissions) using INSOMNIA with GET and BasicAuth. But out of my VBA-code it does not work. And apart from that, BasicAuth was said to be a bad choice.
The endpoint …/v1/users/[integer id] can be used to get information about the individual user with the specified id. (There is no …/v1/users/Authenticate endpoint.) Instead, you need to create a session. It is the session object that contains the token. The documentation for "Logging in" shows the endpoint that you can use for this, which is …/v1/sessions. If you POST to this endpoint with your credentials (as JSON), a session object should be returned with a token. (See the documentation for details on how to formulate this request.)
That's right: submission deletion is not yet implemented in the API. However, we plan to add it to the API: take a look at this topic for more about what's already been implemented in ODK Central and what's coming up.