ServiceConnect["service"]
creates a connection to an external service.
ServiceConnect["service","id"]
uses the specified connection identifier.
ServiceConnect
Listing of Supported External Services »ServiceConnect["service"]
creates a connection to an external service.
ServiceConnect["service","id"]
uses the specified connection identifier.
Details and Options
- ServiceConnect works with a growing number of external services.
- Use $Services to see all available services, also given in the guide "Listing of Supported External Services".
- If it succeeds in making a connection, ServiceConnect returns a ServiceObject.
- Use ServiceObjects[] to list all available service objects.
- ServiceConnect["service"] will attempt to reopen the last used connection to a particular service if it exists; otherwise, it creates a new connection.
- ServiceConnect["service","id"] attempts to restore connection with the specified ID. If the connection cannot be restored, a new connection will be created with the provided ID.
- ServiceConnect["service","New"] forces a new connection to be created to a particular service.
- The following options can be provided:
-
Authentication Automatic the authentication credentials or method SaveConnection False whether to store the connection in user's cloud account - Services are typically authenticated through API keys, username and passwords or OAuth authorization.
- Possible settings for Authentication include:
-
Automatic attempt to use saved credentials or give a dialog "Dialog" give authentication parameters via a dialog Environment["var"] retrieve authentication from environment variables SystemCredential["key"] retrieve authentication information from secure storage SystemCredentialData[…] stored authentication data SecuredAuthenticationKey[…] give an OAuth-secured authentication key assoc provide explicit credentials - Use delayed settings such as Authentication:>SystemCredential["key"] to delay the evaluation of stored credentials.
Examples
open all close allBasic Examples (1)
Scope (4)
Authenticate a Reddit account to retrieve information:
reddit = ServiceConnect["Reddit"]Retrieve information about the "r/space" subreddit:
reddit["SubredditInformation", {"Subreddit" -> "Space"}]Create a service object with a specified ID:
so1 = ServiceConnect["OpenAI", "first", Authentication -> "auth1"]
so2 = ServiceConnect["OpenAI", "second", Authentication -> "auth2"]Verify the stored authentication information:
so1["Authentication"]
so2["Authentication"]Retrieve a service object with a specific ID:
ServiceConnect["OpenAI", "second"]
%["Authentication"]If multiple service objects for a service exist, ServiceConnect will pick the last used one:
ServiceConnect["OpenAI", "first"];
ServiceConnect["OpenAI", "second"];List all the existing service objects for OpenAI:
ServiceObjects["OpenAI"]Let ServiceConnect pick the most recently used object:
ServiceConnect["OpenAI"]Delete a service object created with ServiceConnect:
ServiceConnect["OpenAI"]DeleteObject@%ServiceObjects[]Options (3)
Authentication (2)
Connect to the OpenAI API using the Authentication option to send an API key:
openAI = ServiceConnect["OpenAI", Authentication -> "myOpenAIKey"]openAI["ImageCreate", {"Prompt" -> "a cute cat"}]Connect to the Reddit API, authenticating with a particular Reddit app instead of the default Wolfram Connector app:
consumerKey = "myConsumerKey";
consumerSecret = "myConsumerSecret";redditKey = SecuredAuthenticationKey[<|"ClientID" -> consumerKey, "ClientSecret" -> consumerSecret, "OAuthType" -> "AuthorizationCode", "OAuthVersion" -> "2.0", "UserAuthorizationURL" -> "https://www.reddit.com/api/v1/authorize?duration=permanent", "AccessTokenURL" -> "https://www.reddit.com/api/v1/access_token", "RedirectURI" -> Automatic, "VerifierInputFunction" -> "WolframConnectorChannel", "Scopes" -> {"identity", "edit", "flair", "history", "modconfig", "modflair", "modlog", "modposts", "modwiki", "mysubreddits", "privatemessages", "read", "report", "save", "submit", "subscribe", "vote", "wikiedit", "wikiread"}|>]reddit = ServiceConnect["Reddit", "New", Authentication -> redditKey]reddit["UserData"]SaveConnection (1)
Text
Wolfram Research (2014), ServiceConnect, Wolfram Language function, https://reference.wolfram.com/language/ref/ServiceConnect.html (updated 2025).
CMS
Wolfram Language. 2014. "ServiceConnect." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2025. https://reference.wolfram.com/language/ref/ServiceConnect.html.
APA
Wolfram Language. (2014). ServiceConnect. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ServiceConnect.html
BibTeX
@misc{reference.wolfram_2026_serviceconnect, author="Wolfram Research", title="{ServiceConnect}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/ServiceConnect.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_serviceconnect, organization={Wolfram Research}, title={ServiceConnect}, year={2025}, url={https://reference.wolfram.com/language/ref/ServiceConnect.html}, note=[Accessed: 13-June-2026]}