- Stitch >
- MongoDB Atlas >
- Reference
Connection Strings¶
On this page
Overview¶
To connect to Stitch over the wire protocol, you must construct a
MongoDB connection string that
includes credentials for an application user and an
application-specific appName
query parameter.
URL Encoding
You must URL encode connection strings before you can use them to connect to Stitch. Connection strings in the Stitch UI are properly encoded by default.
Stitch connection strings have the following form:
Connection String Components¶
Credentials¶
All Stitch operations that you issue over the wire protocol run in the context of a specific application user that you specify in the connection string. The user must be registered with the Email/Password, API Key, or Custom JWT authentication provider.
The contents of connection string credentials depend on the authentication provider with which the user registered:
- Email/Password
- API Key Authentication
- Custom
Format | <email>:<password> |
||||
---|---|---|---|---|---|
Fields |
|
||||
Example |
Format | _:<apiKey> |
||
---|---|---|---|
Fields |
|
||
Example |
Format | _:<customAuthToken> |
||
---|---|---|---|
Fields |
|
||
Example |
Parameters¶
Stitch requires specific connection string options that identify the application you want to connect to and the authentication provider associated with the credentials that you provide.
Stitch connection strings have the following query parameters:
Parameter | Description | ||||||
---|---|---|---|---|---|---|---|
authMechanism |
This parameter should always be set to PLAIN . |
||||||
authSource |
This parameter should always be set to $external . |
||||||
appName |
Uniquely identifies the application, MongoDB service, and authentication provider to which you want to connect. The
|