XF 2.2 Accessing the API URL

As I understand it, we should be able to see something when we go to example.com/forum/api but when I hit that on our site it is redirecting us back to the site root. What should I be looking for to see why this is happening?

ETA: I've tried this with friendly URLS both activated and deactivated. Same result each time.
 
Last edited:
Shouldn't I be seeing something at least? Instead of it returning to the site homepage? Like this:

errors
0
code"no_api_key_in_request"
message"No API key was included in the request."
params[]
 
Then why is it redirecting back to the front page of the site instead of giving me the JSON array? We're trying to troubleshoot a plug-in and that is part of what is causing us problems.
 
It was longtime asked but I just got the same error just after installing a fresh version of 2.2.9 on local to test out something.
I created the API key in admin console and in postman, I've made sure I've added the correct key in header: XF-Api-User
Any idea where to look? I use Xampp. I believed years ago when I test this , it was working fine.
I do have .htaccess file. I noticed I don't have a folder called api. Is it normal?
Thanks!

Updated: Found out my own error, it's now fixed. It was the wrong key, it should be XF-Api-Key instead
 
Last edited:
Back
Top Bottom