MDN wants to learn about developers like you:


This page is not complete.

I'm experimenting with structure for pages documenting members of dictionaries. Please contact sheppy with any feedback.

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The RTCIceServer dictionary's credentialType property is a string value from the RTCIceCredentialType enum which indicates what type of credential the RTCIceServer.credential value is. The default is "password".


var iceServer = {
                  credentialType = ["password" | "token"],

var credential = iceServer.credentialType;

iceServer.credential = ["password" | "token"];


RTCIceCredentialType enum

The RTCIceCredentialType enum specifies values which can be returned by the credentialType property to define what kind of authentication credential is being provided in the RTCIceServer.credential property. This can be one of the values below.

Constant Description
"password" The credential is a long-term authentication password. See RFC 5389, section 10.2 for further details on this type of credential.
"token" The credential is an access token to be used with a third-party authentication system.


This example creates a new RTCPeerConnection which will use a TURN server at to negotiate connections. Logging into the TURN server will use the username "webrtc" and the creative password "turnpassword".

myPeerConnection = new RTCPeerConnection({
  iceServers: [
      urls: "",  // A TURN server
      username: "webrtc",
      credential: "turnpassword",
      credentialType: "password"


Specification Status Comment
WebRTC 1.0: Real-time Communication Between Browsers
The definition of 'RTCIceServer.credential' in that specification.
Candidate Recommendation Initial specification.

Browser compatibility

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support (Yes) 47 (47)[1] ? ? ?
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support ? (Yes) 47.0 (47)[1] ? ? ?

[1] Although support for this property was added in Firefox 47, Firefox continues to only support password authentication, regardless of what you set the credential type to. See bug 1247616.

See also

Document Tags and Contributors

 Contributors to this page: Sheppy
 Last updated by: Sheppy,