import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const authenticationProvider = await client.authenticationProviders.create({
name: 'Okta',
settings: {
idp_cert_fingerprint: '13:38:C7:BB:C9:FF:4A:70:38:3A:E3:D9:5C:CD:DB:2E:50:1E:80:A7',
idp_entity_id: 'https://myorg.myidp.com/saml/metadata',
idp_sso_target_url: 'https://myorg.myidp.com/trust/saml2/http-post/sso',
},
short_name: 'myorg',
});
console.log(authenticationProvider.data);{
"data": {
"id": "35146afd-df93-4963-b1e9-1a085e2ae874",
"record_type": "authentication_provider",
"name": "Okta",
"short_name": "myorg",
"organization_id": "24b4a4bb-c4df-46ad-bbcb-23fc741c5ad7",
"active": true,
"settings": {
"assertion_consumer_service_url": "https://api.telnyx.com/sso/saml/auth/myorg",
"service_provider_entity_id": "https://api.telnyx.com/sso/saml/metadata/myorg",
"idp_entity_id": "https://myorg.myidp.com/saml/metadata",
"idp_sso_target_url": "https://myorg.myidp.com/trust/saml2/http-post/sso",
"idp_cert_fingerprint": "13:38:C7:BB:C9:FF:4A:70:38:3A:E3:D9:5C:CD:DB:2E:50:1E:80:A7",
"idp_cert_fingerprint_algorithm": "sha256",
"name_identifier_format": "urn:oasis:names:tc:SAML:1.1:nameid-format"
},
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z"
}
}Creates an authentication provider.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const authenticationProvider = await client.authenticationProviders.create({
name: 'Okta',
settings: {
idp_cert_fingerprint: '13:38:C7:BB:C9:FF:4A:70:38:3A:E3:D9:5C:CD:DB:2E:50:1E:80:A7',
idp_entity_id: 'https://myorg.myidp.com/saml/metadata',
idp_sso_target_url: 'https://myorg.myidp.com/trust/saml2/http-post/sso',
},
short_name: 'myorg',
});
console.log(authenticationProvider.data);{
"data": {
"id": "35146afd-df93-4963-b1e9-1a085e2ae874",
"record_type": "authentication_provider",
"name": "Okta",
"short_name": "myorg",
"organization_id": "24b4a4bb-c4df-46ad-bbcb-23fc741c5ad7",
"active": true,
"settings": {
"assertion_consumer_service_url": "https://api.telnyx.com/sso/saml/auth/myorg",
"service_provider_entity_id": "https://api.telnyx.com/sso/saml/metadata/myorg",
"idp_entity_id": "https://myorg.myidp.com/saml/metadata",
"idp_sso_target_url": "https://myorg.myidp.com/trust/saml2/http-post/sso",
"idp_cert_fingerprint": "13:38:C7:BB:C9:FF:4A:70:38:3A:E3:D9:5C:CD:DB:2E:50:1E:80:A7",
"idp_cert_fingerprint_algorithm": "sha256",
"name_identifier_format": "urn:oasis:names:tc:SAML:1.1:nameid-format"
},
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The name associated with the authentication provider.
"Okta"
The short name associated with the authentication provider. This must be unique and URL-friendly, as it's going to be part of the login URL.
"myorg"
The settings associated with the authentication provider.
Show child attributes
The Entity ID for the identity provider (IdP).
"https://myorg.myidp.com/saml/metadata"
The SSO target url for the identity provider (IdP).
"https://myorg.myidp.com/trust/saml2/http-post/sso"
The certificate fingerprint for the identity provider (IdP)
"13:38:C7:BB:C9:FF:4A:70:38:3A:E3:D9:5C:CD:DB:2E:50:1E:80:A7"
The algorithm used to generate the identity provider's (IdP) certificate fingerprint
sha1, sha256, sha384, sha512 "sha256"
The active status of the authentication provider
true
The URL for the identity provider metadata file to populate the settings automatically. If the settings attribute is provided, that will be used instead.
"https://myorg.myidp.com/saml/metadata"
Successful response
Show child attributes
Uniquely identifies the authentication provider.
"35146afd-df93-4963-b1e9-1a085e2ae874"
Identifies the type of the resource.
"authentication_provider"
The name associated with the authentication provider.
"Okta"
The short name associated with the authentication provider. This must be unique and URL-friendly, as it's going to be part of the login URL.
"myorg"
The id from the Organization the authentication provider belongs to.
"24b4a4bb-c4df-46ad-bbcb-23fc741c5ad7"
The active status of the authentication provider
true
The settings associated with the authentication provider.
Show child attributes
The Assertion Consumer Service URL for the service provider (Telnyx).
"https://api.telnyx.com/sso/saml/auth/myorg"
The Entity ID for the service provider (Telnyx).
"https://api.telnyx.com/sso/saml/metadata/myorg"
The Entity ID for the identity provider (IdP).
"https://myorg.myidp.com/saml/metadata"
The SSO target url for the identity provider (IdP).
"https://myorg.myidp.com/trust/saml2/http-post/sso"
The certificate fingerprint for the identity provider (IdP)
"13:38:C7:BB:C9:FF:4A:70:38:3A:E3:D9:5C:CD:DB:2E:50:1E:80:A7"
The algorithm used to generate the identity provider's (IdP) certificate fingerprint
sha1, sha256, sha384, sha512 "sha256"
The name identifier format associated with the authentication provider. This must be the same for both the Identity Provider (IdP) and the service provider (Telnyx).
"urn:oasis:names:tc:SAML:1.1:nameid-format"
ISO 8601 formatted date indicating when the resource was created.
"2018-02-02T22:25:27.521Z"
ISO 8601 formatted date indicating when the resource was updated.
"2018-02-02T22:25:27.521Z"
Was this page helpful?