Quick Start Guide 🚀
Ready to experience the power of Unblock API? This guide will walk you through making your first API call in just a few minutes!
Prerequisites ✅
Before you begin, make sure you have the following:
- An Unblock API Key:
- Option 1: Open Sandbox (Public API Key - For Immediate Exploration): You can use our Open Sandbox environment and a publicly available API Key to start exploring immediately. This option does not require completing the Onboarding Form initially and is perfect for quickly getting a feel for the API. You'll find the Public API Key in the Setting Up Your Development Environment guide.
- Option 2: Dedicated Sandbox API Key (After Onboarding): For more in-depth testing and when you are ready to move beyond basic exploration, you can obtain a dedicated Sandbox API Key after completing the Onboarding Form. This option provides a more isolated environment and is recommended for serious development and moving towards Production.
- A Tool to Make API Requests: We recommend using
curl
in your terminal, or a tool like Postman or Insomnia.
Step 1: Access the Sandbox Environment 🏖️
Unblock provides a Sandbox environment for testing and development. This environment uses simulated data and does not involve real money, allowing you to experiment safely.
The base URL for the Sandbox environment is: https://sandbox.getunblock.com
Read more about Unblock Environments
Step 2: Make Your First API Call 📞
Let's retrieve the current exchange rate for EURO to USD as your first API call. We will use a GET
request to the /exchange-rates/
endpoint.
Using curl:
Open your terminal and paste the following curl
command.
If you are using the Open Sandbox for immediate exploration, you can use the following sample public API Key directly in the command below. Replace YOUR_SANDBOX_API_KEY
with this sample key or your own dedicated Sandbox API Key if you have obtained one after onboarding.
Sample Public API Key (for Open Sandbox): API-Key +74/0TAhXh0sFWyaeoHcY7XfVCAEqLvIwqKnOz7rjHB5a36By9E3ibevU09zNWNQ
curl --request GET \
--url 'https://sandbox.getunblock.com/exchange-rates/?base_currency=EUR&target_currency=USD' \
--header 'Authorization: API-Key <YOUR_SANDBOX_API_KEY>' \
--header 'accept: application/json'
Example using the sample public API Key:
curl --request GET
--url '<https://sandbox.getunblock.com/exchange-rates/?base_currency=EUR&target_currency=USD'>
--header 'Authorization: API-Key +74/0TAhXh0sFWyaeoHcY7XfVCAEqLvIwqKnOz7rjHB5a36By9E3ibevU09zNWNQ'
--header 'accept: application/json'
Expected Response (Successful 200 OK):
If your API Key is correctly set up, you should receive a 200 OK response with a JSON body similar to this:
{
"base_currency": "EUR",
"target_currency": "USD",
"exchange_rate": "1.0876"
}
Congratulations! 🎉 You've successfully made your first API call to Unblock!
Learn more about API Key Authentication
Explore the Exchange Rate Endpoint in API Reference
Step 3: Explore the API Reference 📘
Now that you've made a successful call, we encourage you to explore the API Reference section to discover all the available endpoints and functionalities of the Unblock API.
The API Reference allows you to:
- Browse all available endpoints, categorized by functionality.
- View request parameters, body parameters, and response schemas.
- Make authenticated API requests directly within the documentation using your API Key.
Next Steps 🪜
- Dive into the Guides: Explore the Guides section for in-depth explanations of key concepts like Webhooks, Know your customer (KYC), Transaction Flows and more.
- Follow the Recipes: Check out the Recipes section for step-by-step guides on how to achieve specific integration goals.
- Start Building! Begin integrating Unblock API into your application and unlock seamless global payments for your users!
Updated about 1 month ago