| PixLab  & FACEIO | Knowledge Sharing & Public Forums


SwiftUI JSON Post Request and FACEIO Integraton

Asked
Modified
Viewed 25849 times
24

Subject: Support Request: Issue with Content-Type Error

Dear Support Team,

I hope this message finds you well. I am writing to request assistance regarding an issue I am experiencing while attempting to use the setfacialidpincode API endpoint.

Problem Description:

I am receiving the following error message:

swift
Copiar código
"Only \"application/json\" Content-Type is handled by this API."
Despite configuring the request in Postman with the Content-Type set to application/json, the error persists.

Steps Taken:

Configured the POST request to https://api.faceio.net/setfacialidpincode.
Added the header Content-Type: application/json.
Ensured the body format is set to raw and JSON.
Verified that no other headers conflict with the Content-Type.
Cleared the cache and restarted Postman.
Tried both the Postman desktop app and web version.
Request Body Example:

json
Copiar código
{
"key": "bcdf98115755c1fd1e49e49761b7e2c1",
"fid": "dfdcff2420044262aaa0283fb721e86bfioa0032",
"pin": 9999
}
I have referred to the Developer Center and the Community Forum but was unable to find a resolution to this specific issue. I would appreciate your guidance on how to resolve this error and proceed with the API integration.

Thank you for your assistance. I look forward to your response.

Best regards,


Accepted Solution

11
Hi,
 
The FACEIO REST-API service is fully operational, and the error appears to be on your side, please refer to the following tutorials on how to make a JSON POST SwiftUI API call:

Do not replace the API access URL with the the target FACEIO API Endpoint URL.