contao / contao-manager

Contao Manager
GNU Lesser General Public License v3.0
83 stars 33 forks source link

Contao Manager API rejects Token #792

Closed M-Zoldak closed 5 months ago

M-Zoldak commented 5 months ago

I can't read data from Contao manager API after retrieving token. API returns Access denied - 403 for any call.

It's still working with tokens retrieved old way, saved in DB for other websites.

aschempp commented 5 months ago

Please explain exactly what you're doing. What does your request look like?

M-Zoldak commented 5 months ago
  1. I'm saving token which comes with access_token parameter.
  2. Making curl request to example.com/contao-manager.phar.php/api/server/php-web with headers, including Authorization: Bearer "previously saved token", and some more.

And at this point, for Tokens created before (I assume) contao-manager < ~1.8.0 this call works perfectly, and for calls with tokens received from contao-manager > 1.8.0, it returns 403 response.

aschempp commented 5 months ago

Are you sure you‘re saving the token? The token return URL has changed, there is no query parameter for the token, it is in the URL hash only!

M-Zoldak commented 5 months ago

Yes, I'm sure whole Token is saved - from hash, and not from parameter.

M-Zoldak commented 5 months ago

Ok, my big mistake.

I made a request to my own website instead of client website.