import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const response = await client.portingOrders.actions.share('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
console.log(response.data);{
"id": "03a35311-ad92-46b3-95d7-8ad6dccf2d7c",
"porting_order_id": "fd4b86c8-497d-4c6d-9609-a789e4e14cfe",
"expires_in_seconds": 3600,
"permissions": [
"porting_order.document.read",
"porting_order.document.update"
],
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2ODk4OTQ2NzcsImlzdCI6MTY4OTg5MTA3NywicGVybWlzc2lvbnMiOlsicG9ydGluZ19vcmRlci5kb2N1bWVudC5yZWFkIl0sInBvcnRpbmdfb3JkZXJfaWQiOiJmZDRiODZjOC00OTdkLTRjNmQtOTYwOS1hNzg5ZTRlMTRjZmUifQ.CT0HRF6OLj7VPZ8p5Y_0S8rOL8SEUznwJJkR-YReKwc",
"record_type": "porting_order_sharing_token",
"expires_at": "2023-07-20T23:11:17Z",
"created_at": "2023-07-20T22:11:17.292573Z"
}Creates a sharing token for a porting order. The token can be used to share the porting order with non-Telnyx users.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const response = await client.portingOrders.actions.share('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
console.log(response.data);{
"id": "03a35311-ad92-46b3-95d7-8ad6dccf2d7c",
"porting_order_id": "fd4b86c8-497d-4c6d-9609-a789e4e14cfe",
"expires_in_seconds": 3600,
"permissions": [
"porting_order.document.read",
"porting_order.document.update"
],
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2ODk4OTQ2NzcsImlzdCI6MTY4OTg5MTA3NywicGVybWlzc2lvbnMiOlsicG9ydGluZ19vcmRlci5kb2N1bWVudC5yZWFkIl0sInBvcnRpbmdfb3JkZXJfaWQiOiJmZDRiODZjOC00OTdkLTRjNmQtOTYwOS1hNzg5ZTRlMTRjZmUifQ.CT0HRF6OLj7VPZ8p5Y_0S8rOL8SEUznwJJkR-YReKwc",
"record_type": "porting_order_sharing_token",
"expires_at": "2023-07-20T23:11:17Z",
"created_at": "2023-07-20T22:11:17.292573Z"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Porting Order id
Successful response
Show child attributes
Uniquely identifies this sharing token
"0a4b78a0-d416-4761-94f7-46c72ec56547"
Identifies the porting order resource being shared
"f1486bae-f067-460c-ad43-73a92848f902"
The number of seconds until the sharing token expires
x >= 13600
The permissions granted to the sharing token
porting_order.document.read, porting_order.document.update [
"porting_order.document.read",
"porting_order.document.update"
]A signed JWT token that can be used to access the shared resource
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2ODk4OTQ2NzcsImlzdCI6MTY4OTg5MTA3NywicGVybWlzc2lvbnMiOlsicG9ydGluZ19vcmRlci5kb2N1bWVudC5yZWFkIl0sInBvcnRpbmdfb3JkZXJfaWQiOiJmZDRiODZjOC00OTdkLTRjNmQtOTYwOS1hNzg5ZTRlMTRjZmUifQ.CT0HRF6OLj7VPZ8p5Y_0S8rOL8SEUznwJJkR-YReKwc"
ISO 8601 formatted date indicating when the sharing token expires.
"2021-03-19T10:07:15.527000Z"
Identifies the type of the resource.
"porting_order_sharing_token"
ISO 8601 formatted date indicating when the resource was created.
"2021-03-19T10:07:15.527000Z"
Was this page helpful?