Delete User : 405 method not Allowed


#1

Hi

I’m using API for insert / update my users list (batch) with my hapikey
But I’ve an error when I want to delete one :
https://api.hubapi.com/contacts/v1/contact/vid/50376624?hapikey=xxxxx

I get a 405 response : “Method Not Allowed”

Any idea to help me ?


#2

Hi @seb2

That endpoint will only accept DELETE requests, so if you’re making a GET or POST request you’ll get that error.


#3

Hello

https://api.hubapi.com/contacts/v1/contact/vid/50376624?hapikey=xxxxx is a DELETE request, no ?

So why this error ?


#4

That URL should work with a DELETE request, and I’m not seeing that 405 error making a DELETE to that URL (even if you leave the hapikey=xxxxx in there, you should still get a 401 error and not a 405).

What are you using to make that request when you’re getting that error?


#5

If I copy / paste this url …api.hubapi.com/contacts/v1/contact/vid/50376624?hapikey=xxxxx in my browser, I have the 405 error
(idem with a real hapikey) …


#6

Your browser makes a GET request.

“DELETE request” isn’t referring to the intentions of your action, it is about the HTTP method that is used.

Have a look here:

http://www.restapitutorial.com/lessons/httpmethods.html