Hey, all you wonderful no-coders out there.
Last month I set up the API connection to Ayrshare allowing us to post (and schedule) on social media on behalf of our users.
We now have 346 users connected and are thrilled with it so far. @gbourne and his team have been very helpful on supporting me through the process, and I want to share my set-up, so you can give it a go too.
Ayrshare account and API key
Before starting, you have to create an account with Ayrshare to get your API key. If you want to post on behalf of your users, you’ll need a Business plan: Business Plan For Multiple Users - Ayrshare
They do have a plugin if you just want to use it for yourself, but if you want to post on behalf of your users, you’re going to have to set up via the API connector. No worries if you haven’t done this before, it’s actually straightforward once you start.
how to set it up
- open the Plugins tab
- click on API Connector
- Add another API > give it a name (I called mine Ayrshare)
- Set Authentication to “None or self-handled”
- In the shared headers for all calls, add two shared headers
Key: Authorization Value: Bearer (your API key)
(don’t forget to add Bearer in front if you want this to work.)
Key: Content-Type Value application/json
Adding the calls
Depending on how you’re going to use the API, you’ll want to create several calls.
You’ll find the list of available calls in their documentation here: Endpoints - Ayrshare Docs
how to create a new call
- click on “Add another call”
- give it a name (mine all start with Ayrshare + call type)
- select Use as “Action” if you want to able to use it in the workflow, or “Data” to just get the data
- data type for this set up is always JSON
- POST or GET depending on the type of call you’re setting up and URL for the call (you’ll find this in the documentation)
Note, when you copy the URL from the documentation, there is often a space in the URL. Remove it of the call won’t work.
- Headers you can leave blank as we’ve added them at the top
- Body Type - for this setup is JSON
- Parameters & Body > see setups below
note: you’ll want to activate “include errors” and “capture response headers” to get messages back in case something goes wrong.
- When you’ve finished setting up the call elements, click on Initialize Call to test the setup and start using the API call.
If there is a problem with the set-up, you’ll get a message from the server.
Here are the main calls I set up for reference and the ones with some “unique needs”.
Once you’ve done a few, the others mainly follow the same rules
Create user profile (documentation)
Generate a JWT (documentation)
You will get the domain name and the key from Ayrshare upon signup. I recommend to keep these private.
The profile key is unique to each user - uncheck private so you can add this dynamically on each call. You can get that from the Ayrshare account when setting up under user profile > profile key.
In the platforms field, enter the names like this: “facebook”, “instagram”, “twitter” (currently no stats on linkedin, so if you add that platform there will be an error).
GET Comments (documentation)
This setup is a little different as the parameters are added to the URL instead of the body.
Those are the main ones I needed help with. The others so far were quite straightforward.
Once you’ve set this up, here is an article to help with the next steps: How To Create A Social Media Scheduling App With No Code - Ayrshare
I hope this was helpful and will continue updating as I continue my Ayrshare journey
Happy posting !