Function Repository Resource:

SetDefaultPublisherID

Source Notebook

Change your default publisher ID for Wolfram repositories

Contributed by: Bob Sandheinrich

ResourceFunction["SetDefaultPublisherID"]["pubid"]

permanently sets the current cloud-connected user's default $PublisherID to "pubid".

Details

A PublisherID identifies the entity responsible for the submission of content to a repository in the Wolfram Resource System, like the function, paclet or data repository.
The user must already have access to the publisher ID. ResourceFunction["SetDefaultPublisherID"] will not create a new publisher ID or grant access to any publisher IDs.
Available publisher IDs can be found by signing into Wolfram Cloud in a browser and going to the user publishers page.
This change will persist into future sessions and anywhere that you authenticate with the Wolfram Cloud. Reuse this function to change the value again (there is no concept of resetting to a default, default).

Examples

Basic Examples (3) 

Get your default publisher ID:

In[1]:=
$PublisherID
Out[1]=

Change your default publisher ID:

In[2]:=
ResourceFunction["SetDefaultPublisherID"]["SamplePublisher"]
Out[2]=

Recheck the default publisher ID to verify the change:

In[3]:=
$PublisherID
Out[3]=

Properties and Relations (4) 

The default publisher ID applies to the cloud-connected user, available as $CloudUserID:

In[4]:=
$CloudUserID
Out[4]=

Set the default publisher ID for this user:

In[5]:=
ResourceFunction["SetDefaultPublisherID"]["Bob"]
Out[5]=

Change the cloud-connected user. This user has no available publisher IDs:

In[6]:=
CloudConnect["writesting+wpc_explorerm@outlook.com"]
Out[6]=
In[7]:=
$PublisherID
Out[7]=

Attempting to set a default publisher ID fails:

In[8]:=
ResourceFunction["SetDefaultPublisherID"]["Bob"]
Out[8]=

Possible Issues (2) 

Attempting to set the default publisher ID to a new, unregistered ID will fail:

In[9]:=
ResourceFunction["SetDefaultPublisherID"]["SecretAgent007"]
Out[9]=

Go to the resource system publishers page to see your available publisher IDs and use one of those values:

In[10]:=
ResourceFunction["SetDefaultPublisherID"]["SamplePublisher"]
Out[10]=

Version History

  • 1.0.0 – 27 January 2023

Related Resources

Author Notes

The Failure results should be improved in a future update.

License Information