Skip to main content

Introduction

CELITECH API allows you to integrate mobile data connectivity into your applications, products, or services. This guide will walk you through the essential steps to get started with the API, including a detailed explanation of the authentication process.

Step-by-Step Integration

Step 1: Obtain Your API Credentials

  1. Log in to your CELITECH dashboard.
  2. Navigate to the Developers section on the left.
  3. Click on API CREDENTIALS
  4. Here, you will find your Client Id and Client Secret. Copy them as you will need them for authentication.

CELITECH Dashboard

Step 2: Generate Token

To generate a token, follow these two steps:

1. Make a POST Request to Obtain an Access Token

Use the following Depending on your choice of programming language, making sure to replace YOUR_CLIENT_ID and YOUR_CLIENT_SECRET with your actual client credentials.

curl -X POST "https://auth.celitech.net/oauth2/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET"

2. Copy the Access Token from the Response

After executing the command, you will receive a JSON response that includes the access token. It will look something like this:

{
"access_token": "YOUR_ACCESS_TOKEN",
"token_type": "Bearer",
"expires_in": 3600
}

Copy the value of access_token for use in subsequent requests. Make sure to keep this token secure, as it allows access to protected resources.

Step 3: Purchase an eSIM

Use the following Depending on your choice of programming language, making sure to provide the access token retrieved from the previous step.

curl -i -X POST \
https://api.celitech.net/v1/purchases \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"destination": "FRA",
"dataLimitInGB": 1,
"startDate": "2024-01-01",
"endDate": "2024-01-31"
}'

Step 4: Handling Responses

Responses are returned in JSON format. Handle them according to your application's needs.

Additional Resources

  • API Reference: Detailed information about endpoints, parameters, and responses can be found in the API Reference.
  • Support: For further assistance, contact CELITECH support.

Conclusion

By following this guide, you should be able to integrate CELITECH's mobile data connectivity into your application. Explore the full API documentation for more advanced features and capabilities.