Forum Discussion
Ingest data form a rest API with Oauth2
Hello, I've tried your solution, but I always have the same problem "unsupported media type".
I am not sure what I do is ok. I have several Url:
- 1 base Url
- 1 authorization URL (base+relative)
- 1 token URL (base+relative)
- 1 URL where I call the data.
Currently I succeed in getting the data when I pass directly the token (that I get from postman) to the call with the last URL.
I have tried to follow what you have said to get the token in fabric data factory: Connect to the base URL, add the token relative URL, add client id, client seret, username and password to the body, add Content-type Json-application in the header, use POST method, but I always have this answer.
Hi MylenePBI ,
The error code 2108 indicates an Unsupported Media Type error. This error occurs when the Content-Type header of the request does not match the media type of the content being sent.
For example, if you are sending JSON data in the body of the request, but the Content-Type header is set to application/x-www-form-urlencoded, the server will reject the request with an Unsupported Media Type error.
To fix this error, you need to make sure that the Content-Type header matches the media type of the content being sent. For example, if you are sending JSON data, the Content-Type header should be set to application/json.
Can you please share few screenshots and details of your implemenation so that I can guide you better?
Note: Try to hide sensitive information in case if any.
Further Queries:
Do you require authorization URL (base+relative) inorder to use token URL (base+relative) and get the token?
As I understand -
token URL (base+relative) --> token (passing) ---> URL (where I call the data) --> data as response