Im having trouble with POST to my filekamer cloud hosted file which im hoping will generate a token. Unfortunately Im getting an error. Im logging in using the basic auth option - none of the others seemed relevant
“message”: “Invalid content type (application/octet-stream). These are valid: application/json”,
“code”: “1708”
I sure Filemaker is configured correctly for API on both the server and the particular file.
Im also using the following URL
The 401 in the response tells us that the call lacks valid authentication credentials.
But to help try and identify the issue we’d need to see what you are sending in your POST request (url/headers/body/parameters).
Could you screenshot the HTTP request?
Assuming you are using the 'Basic Auth" option, the API docs for FileMaker state:
Authorization: a base64-encoded string representing the account name and password to use to log in to the hosted database.
Are you base64 encoding your auth header?
(if this is in the screenshot you can blank out your password/token values for security, but would be useful to see how your http request is structured).
Thank for trying to help.
here is my header showing the authorisation. maybe that is useful. I read in the postman help files that basic auth uses base64- otherwise I have no idea if the request is or is not. (sorry I am very new to all this)
First off, thanks for the screenshot, it helped to see what you were sending, it does have the base64 fully visible though (this can be easily decoded to see username and password). You may want to remove it or blur it out.
401 Unauthorized
Occurs when the client is not authorized to access the API. If this error occurs when attempting to log in to a database session, then there is a problem with the specified user account or password. If this error occurs with other calls, the access token is not specified or it is not valid.
From what I can see it is likely to be how the account is configured. I would log in and check your settings to make sure your account has authorisation to use the API.