# Connect to a Destination Using a Service Token You can establish connections between your assets or third-parties using the information pre-defined in a Service Token. Service Tokens can be issued for both the a-side and the z-side of a connection. For example, you can create a connection from a port to a destination provided by a Service Token. A z-side service token can be issued for a Port, Network Edge virtual device, or a Network. ![](https://docs.equinix.com/assets/images/connectToServiceToken-297ef05b3569dcb6b1ef2511f198787d.png) ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") 1. Authenticate - Submit your user credentials, Client ID, and Client Secret for OAuth2 authentication. Refer to [API Authentication](https://docs.equinix.com/equinix-api/api-authentication.md) for instructions on how to call the OAuth API to validate and authenticate your credentials. 2. Determine your a-side port information. Get your relevant port information using the [Get All Ports](https://docs.equinix.com/api-catalog/fabricv4/ports/getports.md) endpoint. 3. Obtain the z-side service token details from the provider. This information is required to invoke the create connection API. ## Create a Connection from a DOT1Q port to a Service Token[​](#create-a-connection-from-a-dot1q-port-to-a-service-token "Direct link to Create a Connection from a DOT1Q port to a Service Token") To create a connection from a DOT1Q port to a destination defined by a service token, send a `POST` request to the [`/fabric/v4/connections`](https://docs.equinix.com/api-catalog/fabricv4/connections/createconnection.md) endpoint. Specify your a-side port information and your z-side service token details in the body of the request. > **Note** > > A service token can be dispatched to a number of recipients, and it's valid for a single use by any of them. | | **POST /fabric/v4/connections** | | ---------------- | ----------------------------------------------------------------------- | | Method | `POST` | | Endpoint | `/fabric/v4/connections` | | Headers | `Authorization`, `Content-Type` | | Path Parameters | Not applicable | | Query Parameters | Not applicable | | Body Parameters | `type`, `name`, `order`, `bandwidth`, `aSide`, `zSide`, `notifications` | To safely validate this request in production without creating a connection, see [Testing in Production (API Dry Run)](https://docs.equinix.com/equinix-api/testing/testing-in-production-dry-run.md). Sample cURL Request: ``` curl -X POST 'https://api.equinix.com/fabric/v4/connections' -H 'content-type: application/json' -H 'authorization: Bearer ' -d '{     "type": "EVPL_VC",     "name": "Conn-1",     "order": {         "purchaseOrderNumber": "1-129105284100"     },     "bandwidth": 1000,     "aSide": {         "accessPoint": {             "type": "COLO",             "port": {                 "uuid": "a867f685-41b0-1b07-6de0-320a5c00abdd"             },             "linkProtocol": {                 "type": "DOT1Q",                 "vlanTag": 1001             }         }     },     "zSide": {         "serviceToken": {             "uuid": "20d32a80-0d61-4333-bc03-707b591ae2f4"         }     },     "notifications": [         {             "type": "ALL",             "emails": [                 "test@equinix.com",                 "test2@equinix.com"             ]         }     ] }' ``` The parameters included in the request body are specific to this example. For a full list of parameters and their descriptions, see the [API Reference](https://docs.equinix.com/api-catalog/fabricv4/connections/createconnection.md). Sample Response: ``` {     "href": "https://api.equinix.com/fabric/v4/connections/3a58dd05-f46d-4b1d-a154-2e85c396ea62",     "type": "EVPL_VC",     "uuid": "3a58dd05-f46d-4b1d-a154-2e85c396ea62",     "state": "PROVISIONING",     "name": "Conn-1",     "order": {         "purchaseOrderNumber": "1-129105284100",         "billingTier": "Up to 1 Gbps"     },     "bandwidth": 1000,     "aSide": {         "accessPoint": {             "type": "COLO",             "port": {                 "href": "https://api.equinix.com/fabric/v4/ports/a867f685-41b0-1b07-6de0-320a5c00abdd",                 "type": "XF_PORT",                 "uuid": "a867f685-41b0-1b07-6de0-320a5c00abdd"             },             "linkProtocol": {                 "type": "DOT1Q",                 "vlanTag": 1001             }         }     },      "zSide": {         "serviceToken": {             "href": "https://api.equinix.com/fabric/v4/serviceTokens/25acdea5-1eeb-4f0b-8ca9-6c505f46847d",             "uuid": "25acdea5-1eeb-4f0b-8ca9-6c505f46847d"         },         "accessPoint": {             "location": {                 "metroHref" : "https://api.equinix.com/fabric/v4/metros/DC",                 "region": "AMER",                 "metroName": "Ashburn",                 "metroCode": "DC"             },             "port": {                 "type": "XF_PORT",                 "href": "https://api.equinix.com/fabric/v4/ports/c5720fcc-4ae7-ae7e-13e0-306a5c00adaf",                 "uuid": "c5720fcc-4ae7-ae7e-13e0-306a5c00adaf",                 "name": "eqx-nfv-CX-DC6-L-Dot1q-BO-10G-PRI-JUN-7"             },             "linkProtocol": {                 "type": "DOT1Q",                 "vlanTag": 3132             }         }     },     "notifications": [         {             "type": "ALL",             "emails": [                 "test@equinix.com",                 "test2@equinix.com"             ]         }     ],     "operation": {         "equinixStatus": "PROVISIONING",         "providerStatus": "NOT_AVAILABLE"     },     "changeLog": {         "createdDateTime": "2021-07-15T19:30:29.526Z"     } } ``` Response payload includes configuration parameters defined in the request body. For a full list of possible parameters and their descriptions, see the [API Reference](https://docs.equinix.com/api-catalog/fabricv4/connections/createconnection.md). ## Create a Connection from from a QINQ port to a Service Token[​](#create-a-connection-from-from-a-qinq-port-to-a-service-token "Direct link to Create a Connection from from a QINQ port to a Service Token") To create a connection from a QINQ port to a destination defined by a service token, send a `POST` request to the [`/fabric/v4/connections`](https://docs.equinix.com/api-catalog/fabricv4/connections/createconnection.md) endpoint. Specify your a-side port information and your z-side service token details in the body of the request. Sample cURL Request: ``` curl -X POST 'https://api.equinix.com/fabric/v4/connections' -H 'content-type: application/json' -H 'authorization: Bearer ' -d '{     "type": "EVPL_VC",     "name": "Conn-1",     "order": {         "purchaseOrderNumber": "1-129105284100"     },     "bandwidth": 1000,     "aSide": {         "accessPoint": {             "type": "COLO",             "port": {                 "uuid": "a867f685-41b0-1b07-6de0-320a5c00abdd"             },             "linkProtocol": {                 "type": "QINQ",                 "vlanCTag": 1001,                 "vlanSTag": 1002             }         }     },     "zSide": {         "serviceToken": {             "uuid": "20d32a80-0d61-4333-bc03-707b591ae2f4"         }     },     "notifications": [         {             "type": "ALL",             "emails": [                 "test@equinix.com",                 "test2@equinix.com"             ]         }     ] }' ``` The parameters included in the request body are specific to this example. For a full list of parameters and their descriptions, see the [API Reference](https://docs.equinix.com/api-catalog/fabricv4/connections/createconnection.md). ## Monitoring the Connection[​](#monitoring-the-connection "Direct link to Monitoring the Connection") Use the [Get Specified Connection](https://docs.equinix.com/api-catalog/fabricv4/connections/getconnectionbyuuid.md) endpoint to monitor connection status.