maicol07 so, in Insomnia, im making a POST request to my forum API with a JSON body containing identification, password and lifetime
+
a header with the token in 'api_keys' table and my userId=1
i'm still getting error 405 method not allowed
{
"errors": [
{
"status": "405",
"code": "method_not_allowed",
"detail": "Flarum\\Http\\Exception\\MethodNotAllowedException: GET in
thats the timeline provided by Insomnia:
> POST /api/token HTTP/1.1
> Host: forum.objeduc.com.br
> User-Agent: insomnia/7.0.3
> Authorization: Token {master_token}; userId=1
> Accept: */*
> Content-Length: 85
| {
| "identification": "{admin}",
| "password": "{pass}",
| "lifetime": 200000
| }
* upload completely sent off: 85 out of 85 bytes
< HTTP/1.1 301 Moved Permanently
< Server: nginx/1.14.0 (Ubuntu)
< Date: Wed, 23 Oct 2019 04:06:19 GMT
< Content-Type: text/html
< Content-Length: 194
< Connection: keep-alive
< Location: https://forum.objeduc.com.br/api/token
* Ignoring the response-body
* Received 194 B chunk
* Connection #2 to host forum.objeduc.com.br left intact
* Issue another request to this URL: 'https://forum.objeduc.com.br/api/token'
* Switch from POST to GET
* Found bundle for host forum.objeduc.com.br: 0x20acf51e270 [can pipeline]
* Re-using existing connection! (#3) with host forum.objeduc.com.br
* Connected to forum.objeduc.com.br (ip) port 443 (#3)
> GET /api/token HTTP/1.1
> Host: forum.objeduc.com.br
> User-Agent: insomnia/7.0.3
> Authorization: Token {master_token}; userId=1
> Accept: */*
< HTTP/1.1 405 Method Not Allowed
< Server: nginx/1.14.0 (Ubuntu)
< Date: Wed, 23 Oct 2019 04:06:19 GMT
< Content-Type: application/vnd.api+json
< Transfer-Encoding: chunked
< Connection: keep-alive
< Strict-Transport-Security: max-age=31536000