0

Facebook marketing API - GraphInsecureException - The cipher AES128-GCM-SHA256 is not supported for TLSv1.2.

We are using the Facebook business SDK in our application in order to pull the ad_accounts & ads info from Facebook.

Spring boot application: dependency:

<dependency>
<groupId>com.facebook.business.sdk</groupId>
<artifactId>facebook-java-business-sdk</artifactId>
<version>16.0.0</version>
</dependency>

In our application, we are trying to pull the AdAccounts using the graph APIs & getting below GraphInsecureException:

Error:

com.facebook.ads.sdk.APIException$FailedRequestException: {"error":{"message":"The cipher AES128-GCM-SHA256 is not supported for TLSv1.2.","type":"GraphInsecureException","code":8,"fbtrace_id":"Avl7lDpYwvbUQ-wo8jPQKAm"}}

API call:

Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: https://graph.facebook.com/v16.0/<business_id>/owned_ad_accounts?access_token=<access_token>&appsecret_proof=<secretproof>

Note: The fun fact is when we try this on our local machine, it's giving us correct results without error. The issue comes when we run the same piece of code on the dev/QA servers. Is it due to graph apis blocking requests from those servers or what could be the issue?

3
  • Sounds like your server is trying to make the connection with TLS parameters Facebook does not like. Commented Mar 9, 2023 at 9:47
  • When I execute the curl on the server directly, its working & giving the results. when I try the same through the code using the business SDK, its throwing up the above error. @CB Commented Mar 9, 2023 at 10:18
  • I don't know how exactly the SDK makes the requests, whether it uses cUR L or something else. But apparently it uses different TLS parameters. Commented Mar 9, 2023 at 10:40

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question