Good morning,
I do the authentication qith my credentials and i obtain correctly the token, but after I
execute the next operation get with this token I receive response code 401 and 200 with the same request.
Why I receive sometimes error code 401?
Attach my postman with responses
Regards
I am not sure what steps you exactly followed but the error you mentioned is something strange.
These are two approaches to work with rest apis:
1- Get the basic auth base64 encoded string for the user credentials and use it for susequent requests by passing it as auth header. (not recommended)
2- Use the auth rest api to get the alf_ticket and use it for susequent request as auth header by converting to base64 encoded string. see the example here:
https://docs.alfresco.com/content-services/6.1/develop/rest-api-guide/install/#using-the-ticket
$ curl -X GET -H 'Accept: application/json' -H 'Authorization: Basic VElDS0VUXzA4ZWI3ZTJlMmMxNzk2NGNhNTFmMGYzMzE4NmNjMmZjOWQ1NmQ1OTM=' 'http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/queries/nodes?term=dog
Can you try the same request via curl and see what result you get? if you are using endpoint which is behind LB, then try hitting the nodes one by one and see what response you get.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.