Quickstart

This guide will show you how to connect to the Galileo API and send a POST request to the Ping endpoint using cURL, Python, and the Postman API development platform. Make sure you have your Sandbox credentials before you begin (see Sandbox environment in the Environments guide).

📘

Note

New API credentials are required after 30 days and must be generated by a team admin. If the incorrect details are used, your API request will fail and your company account will be locked.

After you finish the quickstart, make sure to see Build a Sample App, where you will learn how to create a sample account, deposit funds, and send requests to a few common endpoints.

cURL

cURL is a terminal tool that enables HTTP requests. It is installed on most computers, so setup should be minimal.

📘

Note

To check if you have cURL, open the terminal and run the command, curl -V. If you have cURL, you should see a version number. If you don’t have it, you can download it here: <a href="https://curl.haxx.se/download.html\" target="_blank">https://curl.haxx.se/download.html.

Follow these steps to send a POST request to the Ping endpoint using cURL:

  1. Open the terminal.
  2. Run the script below, replacing values with your credentials for:
    • apiLogin
    • apiTransKey
    • transactionId — This can be any random string but must be unique for each request.
curl --location --request POST 'https://api-sandbox.cv.galileo-ft.com/intserv/4.0/ping' \
    --header 'response-content-type: json' \
    --header 'Content-Type: application/x-www-form-urlencoded'’ \
    --data-urlencode 'apiLogin=0000' \
    --data-urlencode 'apiTransKey=1111' \
    --data-urlencode 'providerId=29152' \
    --data-urlencode 'transactionId=c6285802-72e4-4760-9011-b39993ecfbd5'
curl --location --request POST "https://api-sandbox.cv.galileo-ft.com/intserv/4.0/ping" ^
    --header "response-content-type: json" ^
    --header "Content-Type: application/x-www-form-urlencoded" ^
    --data-urlencode "apiLogin=0000" ^
    --data-urlencode "apiTransKey=1111" ^
       --data-urlencode "transactionId=c6285802-72e4-4760-9011-b39993ecfbd5"

📘

Note

If you are accessing the CV or Production environment, replace the Sandbox URL and credentials with the URL and credentials that you received from your Galileo representative.

  1. Check the output. A successful ping will return "status_code":0,"status":"Success".

Python

You can also use Python to make API requests in the Sandbox environment.

Python setup

To get started with Python:

  1. If you don't have it, you can download Python here: https://www.python.org/.
  2. When Python is installed, open the terminal.
  3. In the terminal, run one of the following commands to install the requests module:
    • Mac OS/Linuxpython -m pip install requests
    • Windowspy -m pip install requests
  4. Check the output. You should see a message indicating that the module was successfully installed.

Using Python from the terminal

Follow these steps to send a POST request to the Ping endpoint using Python from the terminal:

  1. Open the terminal.
  2. At the prompt, run the command, python.
  3. At the Python prompt, run the script below, replacing values with your Sandbox credentials for:
    • apiLogin
    • apiTransKey
import requests
from xml.dom.minidom import parseString
import uuid

payload = {'apiLogin':'0000', 'apiTransKey':'1111', 'transactionId':uuid.uuid4()}
r = requests.post('https://api-sandbox.cv.galileo-ft.com/intserv/4.0/ping', data=payload')
dom = parseString(r.text)
statusCode = dom.getElementsByTagName('status_code')

print('ping response code=' + statusCode[0].firstChild.nodeValue)

📘

Note

If you are accessing the CV or Production environment, replace the Sandbox URL and credentials with the URL and credentials that you received from your Galileo representative.

  1. Check the output. A successful ping returns ping response code=0.

Using a Python file

To work from a file instead of directly in the terminal:

  1. Paste the code above into a plain text file.
  2. Save the file with the extension .py (for example, test-ping.py).
  3. Open the terminal and navigate to the directory containing your client certificate and .py file.
  4. Run python test-ping.py
  5. Check the output. A successful ping returns ping response code=0.

Postman

Galileo has created a collection for the Postman API client. See Postman Setup for setup instructions and a tutorial for sending a POST request to the Ping endpoint.