All Collections
Service Announcements
How do I test my API integration to verify support for TLS 1.1/1.2?
How do I test my API integration to verify support for TLS 1.1/1.2?

This article has code snippets to test for TLS 1.1/1.2 support in your codebase.

Samantha avatar
Written by Samantha
Updated over a week ago

Please be advised that starting on March 1, 2018, Friendbuy will be deprecating support for TLS version 1.0.  If you are still using TLS version 1.0, you will need to upgrade to 1.1 or 1.2 prior to March 1st to ensure that requests to our platform continue to function.

How do I know if this impacts us?

  • This change only affects Friendbuy's REST API. If you are not integrated with our API, no further action is required.

  • If you are using Friendbuy's REST API, check with your IT team to see if the version of TLS supported by your servers and systems is 1.1. or greater.  If the answer is "yes," you are all set.

  • If you are not sure or the answer is "no," please follow the below steps.

For the verification purposes, we have set up this endpoint address:

Please note that this endpoint is only meant to be used for testing a TLS connection. It will be disabled after the cutover date and should not be used in production code.

Below are examples of test snippets of code in several languages. To test, run the appropriate code snippet in your production environment.

Important: These examples may use libraries that differ from your production code, e.g. the Python snippet uses the requests library to make the request. If your codebase uses a different library than the example, you will need to test with the library used in your codebase.

If you receive the response  {"greeting": "This is the Friendbuy API"} then you are all set and no further action will be needed. If the request throws an error, then you will need to upgrade your environment to support TLS 1.1.


import requests
from requests.exceptions import ConnectionError

    r = requests.get('')
except ConnectionError as e:
    print('TLS 1.1 is not supported. Please upgrade your integration.')


const request = require("request");

request('', (error, response, body) => {
  if (error) {
    console.log('TLS 1.1 is not supported. Please upgrade your integration.');


$curl = curl_init();

$url = "";

curl_setopt($curl, CURLOPT_SSLVERSION, 1.0);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);

$result = curl_exec($curl);
echo $result;




class URLConnectionReader {
    public static void main(String[] args) throws Exception {
        URL testApi = new URL("");
        try {
            URLConnection conn = testApi.openConnection();
            BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
            String inputLine;

            while ((inputLine = in.readLine()) != null)
        } catch(Exception e) {
            System.out.println("TLS 1.1 is not supported. Please upgrade your integration.");

All versions of Go already support TLS 1.2, so you will not need to make any changes.


using System;
using System.IO;
using System.Net;
using System.Text;

public class TestFriendbuyApi
    public static void Main ()
        WebRequest request = WebRequest.Create("");
        request.Credentials = CredentialCache.DefaultCredentials;
        try {
            WebResponse response = request.GetResponse();
            Stream dataStream = response.GetResponseStream();
            StreamReader reader = new StreamReader(dataStream);
            string responseFromServer = reader.ReadToEnd();
        } catch (WebException e) {
            Console.WriteLine(String.Concat(e.Message, e.StackTrace));


require "net/http"

uri = URI.parse('')
http =, uri.port)
http.use_ssl = true

    request =
    response = http.request(request)
    puts response.body
rescue Errno::ECONNRESET => e
    puts "TLS 1.1 is not supported. Please upgrade your integration."

For questions or additional assistance, please contact us at

Did this answer your question?