---
title: Authentication | APIs
---

# Authentication

All apis uses token based authentication for authenticate all incoming requests. You should pass your access token in the `Authorization` header of each request in following format:

```sh [g1:CURL]
curl --location --request GET 'https://api.sembark.com/integrations/v1/ping' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <TOKEN_HERE>'
```

```javascript [g1:NodeJs-Axios]
var axios = require("axios");
var config = {
  method: "get",
  url: "https://api.sembark.com/integrations/v1/ping",
  headers: {
    Accept: "application/json",
    Authorization: "Bearer <TOKEN_HERE>",
  },
};
axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data));
  })
  .catch(function (error) {
    console.log(error);
  });
```

```javascript [g1:NodeJs-Request]
var request = require("request");
var options = {
  method: "GET",
  url: "https://api.sembark.com/integrations/v1/ping",
  headers: {
    Accept: "application/json",
    Authorization: "Bearer <TOKEN_HERE>",
  },
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});
```

```php [g1:PHP-Curl]
$curl = curl_init();
curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.sembark.com/integrations/v1/ping",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_TIMEOUT => 0,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Accept: application/json",
    "Authorization: Bearer <TOKEN_HERE>",
  ],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

## Generate Token

If you are an Admin of your organization, visit your organization's settings page. From there, open the `Integrations` tab and create a `new integration`. You will be prompted with an access token. You can use this token to access our REST Apis.

![Image Showing how to generate new integration with access token](https://sembark.com/assets/images/uploads/api-authentication-generate-token.jpg)

## API Navigation

Current page: [Authentication](https://sembark.com/travel-software/apis/authentication.md)

### Getting Started

* [Requests](https://sembark.com/travel-software/apis/requests.md)
* [Responses](https://sembark.com/travel-software/apis/responses.md)

### Authentication

* [Authentication](https://sembark.com/travel-software/apis/authentication.md)

### API References

* [Ping Request](https://sembark.com/travel-software/apis/ping.md)
* [Trip Plan Requests](https://sembark.com/travel-software/apis/trip-plan-requests.md)
