Profiles API Overview
Create and manage multiple user profiles.
Specify a User Profile in an API call by adding the Profile Key in the header.
User Profiles are one of the core concepts of Ayrshare that allows you to create and manage multiple users. Each one of the users of your platform will have one or more Ayrshare User Profiles. Each User Profile can have one connection to every supported social network.
Profile Key
Many endpoints, such as /user, /analytics, or /delete, can be called on behalf of a Profile account by adding the “Profile-Key” parameter in the Header.
For example, the /delete endpoint can be called to delete a Profile account’s post for the given post id for the provided Profile Key.
Enable or Disable Social Networks
You can disable and enable social networks at either the global level or at the User Profile level.
- Globally manage social account access in the dashboard.
- Manage social account access for a User Profile when creating or updating.
It is important to note that disabled social networks in the global setting, set via the dashboard, override User Profile settings.
For example, if you disable TikTok access in the dashboard, then no User Profile can access TikTok. On the other hand, if you turn on TikTok access in the dashboard but disable it for a specific User Profile, all User Profiles will have access to TikTok except that particular one.
Get the Linked Social Accounts
Retrieve the social accounts a User Profile has linked with either the /profiles endpoint or the /user endpoint.
Post to a User Profile
With the /post endpoint, you can post to a User Profile by adding the Profile Key in the header. The return will be an array of posts or error results, with an overall status. If all posts successful, “success”, or if any post failed, “error”.
You may obtain a user’s Profile Key when the profile is created with the /create-profile endpoint or in Ayrshare’s Web Dashboard GUI by switching to the profile and going to Profile Key page.