Question

API HTTP Error Code: 400 Create a Contact in Superchat

  • 2 November 2023
  • 12 replies
  • 103 views

Userlevel 1
Badge

Hello everyone,

I hope you can help me or provide a solution. I would like to create a contact in Superchat using a POST request via an API. Since the Superchat API documentation is only accessible to users, I have attached an image. I have already tried several approaches. In the header, I had "Authorization" and "X-API-Key" already set. However, whenever I use "Authorization," I encounter the following error: "Failed to create a request in Webhooks by Zapier. The app returned 'Unauthorized' (HTTP Status Code: 401)."

I also tried placing "Bearer" before MY API Token. I validated the JSON code using a JSON validator, and it appears to be correct. Nonetheless, nothing seems to work. I keep receiving the error "Invalid parameter: handles (HTTP Status Code: 400)."


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

12 replies

Userlevel 7
Badge +14

Hi @VIktor1515 

Some attachments did not upload.

 

Userlevel 1
Badge

@Troy Tessalone 

Userlevel 1
Badge

@Troy Tessalone new version

Userlevel 7
Badge +14

@VIktor1515 

The Header needs to go in the Headers section.

 

 

Userlevel 1
Badge

I have 3 “--header “ should i put all 3 in Header ? 

@Troy Tessalone 

Userlevel 7
Badge +14

@VIktor1515 

Headers should be key value pairs as indicated by the section description.

You can use the [+] button to add another pair.

Example

 

Userlevel 1
Badge

Hello @Troy Tessalone , Thanks you for this tip. "However, I'm still getting the error message Error Code 400... Could you possibly help me again?

Userlevel 7
Badge +14

@VIktor1515 

You have type as “phone” twice.

Check if the value for phone supports the character: +

 

Userlevel 1
Badge

Sorry @Troy Tessalone was the wrong image. This is my actual Json Code. The error message remains the same.

Userlevel 1
Badge

@Troy Tessalone I've made changes, but the error remains the same.

Userlevel 7
Badge +14

@VIktor1515 

Try using a CUSTOM POST request.

Put the JSON in the Data section.

 

Userlevel 1
Badge

@Troy Tessalone You're a genius, it worked. Thank you!! Wishing you a great weekend and see you soon.

Best regards, Viktor