Closed wkm97 closed 4 years ago
@wkm97
Write Basic instead of Bearer for Authorization. and secondly locate this file. config->packages->security.yaml and open security.yaml.
Now you just need to change the sequence in firewalls made change as per given in screenshot. check screen shot.
Clear your project cache by: php bin/console c:c
Thanks for replying. I had followed the steps that you kindly provide me and cleared the cache. It successfully returned something to me but there are still problem occurred. The log file is shown as follows:
@wkm97
You are getting internal server error may be it can be due to syntax error or due to some exception while doing API request.
Locate file. vendor->uvdesk->api-bundle->Security->Guards->APIGuard.php
Open file and find getCredentials() function and dump step by step like dump($authorization_key); die; and find from where you are getting exception.
We have checked and it is working fine for us.
I added the dump function over here:
Where can I find the dumped value? Is it correct that I start this dump server and it will display it over here? It didn't show anything when I try to fetch the tickets.
@wkm97 You will see values of variable which you have dump in response of your API request. All the API request will go through this API guard first so you can check it here where you are failing to make a API request.
@wkm97 Is your issue resolved?
If not, you can create a support ticket by mail : support@uvdesk.com here or from visiting here https://support.uvdesk.com/en/customer/create-ticket/
There are other issues on my side (not about uvdesk), I will continue trying. If problem encountered I will create a support ticket.
@wkm97
Sure you can create a support ticket if you are facing any problem with
uvdesk (https://github.com/uvdesk/community-skeleton).
@wkm97 open your project go to: public->.htaccess add these lines in your .htaccess file:
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
And clear your project cache by: php bin/console c:c
and try using this if it works for you.
@papnoisanjeev i have the same error, have u a solution to resolve it ? i tried to get tickets list using curl :
curl -X GET -H "Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "https://xxxxxxxxxxx/api/v1/tickets"
.htaccess is correct, it's like mentionned here
@wkm97 are you succeed to resolve the issue ?
it resolved, i just replaced Bearer by Basic
curl -X GET -H "Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "https://xxxxxxxxxxx/api/v1/tickets"
@tigersf2 Glad to know that your issue has been resolved. For more details check this blog: https://www.uvdesk.com/en/blog/api-resource/
I know I'm reopening an old ticket, but I am getting this same error with, but only when attempting to POST to Literally just was trying to post to /tickets
the weirdest thing was, I used to be able to I successfully created 4 tickets before I started getting the 500 error. I can also still GET /tickets and return all ticket data successfully, but posting just stopped working for whatever reason./tickets
and not /ticket
, my mistake.
I created a token for the authentication in uvdesk.
and I'm unable to fetch tickets using it. There is an internal server error found when trying to fetch tickets.
May I know what did I miss or is there any log file to trace the problem?