directus / v8-archive

Directus Database API — Wraps Custom SQL Databases with a REST/GraphQL API
https://docs.directus.io/api/reference.html
505 stars 204 forks source link

Unauthorised request on any custom endpoint #1809

Open huzaifahj opened 4 years ago

huzaifahj commented 4 years ago

I've created an endpoints.php file containing standard code from your API docs at public/extensions/custom/endpoints/stripe/endpoints.php

When I visit example.com/public/extensions/custom/endpoints/stripe/ or example.com/custom/stripe/ I get:

{ "error": { "code": 3, "message": "Unauthorized request", "class": "Directus\\Exception\\UnauthorizedException", "file": "/var/directus/src/helpers/app.php", "line": 287 } }

public/extensions/custom/endpoints/stripe.php will also give me the same error

Directus version 8.6.1 installed with DigitalOcean One-Click Droplet.

huzaifahj commented 4 years ago

When I open the .htaccess file in /endpoints it says deny from all. Is that normal? I've tried changing it and it has no effect

grig0ry commented 4 years ago

Add project name to request:

example.com/<project_name>/custom/stripe