Skip to content
This repository has been archived by the owner on Dec 29, 2019. It is now read-only.

Status 405 #6

Closed
Klaudioz opened this issue Dec 9, 2019 · 3 comments
Closed

Status 405 #6

Klaudioz opened this issue Dec 9, 2019 · 3 comments

Comments

@Klaudioz
Copy link

Klaudioz commented Dec 9, 2019

Hello, I've been following your tutorials and I've getting a 504 error on Heroku:

image

image

image

I got the same using http or google assistant.

Thanks for you great job with this.

@Klaudioz Klaudioz changed the title status 504 Status 405 Dec 9, 2019
@kevinjalbert
Copy link
Owner

kevinjalbert commented Dec 10, 2019

@Klaudioz Ah yep this is likely because I've changed the API since I started. So the blog post and README are slightly out of date (I've been meaning to get around to updated them -- but I just haven't made it a priority).

471d6c1#diff-da3fed2ed312ed177133617b30862a7d

In the above commit, I changed the API endpoints for add_note and add_task to be POST instead of GET. So you'll have to make POST requests instead.

At the same time there is now authentication present that must be used with the requests (either via the HEADER or api_token attribute in the request body), for added security.

I recommend using curl or something like Postman to make those POST requests as you cannot do it via the browser's URL bar anymore.


I've closed the issue, but continue in the thread if there is additional questions related to this.

@Klaudioz
Copy link
Author

Thanks for your answer. Using POST I got always error 500:

2019-12-10T03:51:46.314581+00:00 heroku[router]: at=info method=POST path="/add_note?title=%20this%20is%20working%20finally" host=notionga.herokuapp.com request_id=8256db3c-962b-4b9d-ac43-d3baf11cf8e5 fwd="34.239.101.36" dyno=web.1 connect=0ms service=43ms status=500 bytes=200 protocol=https

Why I did with IFTTT:

image

@kevinjalbert
Copy link
Owner

For reference the way mine looks is like:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants