API
The API itself offers basic option of posting your content to specific account & page. Note: Scheduling or any other ReVivify account related actions are not currently available via API.
Before you continue using ReVivify API, you should connect your social accounts through your profile ReVivify Dashboard.
- Available accounts
- Get Pages
- Publishing / Sharing Content
- UnPublish
Available Accounts
Fetching available accounts via apiKey is only available to account owner(s). In order to enable owners to share API access (3rd parties) but without risking the data safety of other clients, secretKey is here to prove account is yours. Do not share secretKey with 3rd parties and if compromised, reset it.
$ curl -X POST "https://www.revivify.social/account/API?apiKey=[API_KEY]&action=accounts&secretKey=[SECRET_KEY]" { "connected" : [ { "type" : "fb", "id" : "111111111111111111", "email" : "ewsadaipcr_111111111111111111@tfbnw.net" }, { "type" : "fb", "email" : "lmipmycybc_222222222222222222@tfbnw.net", "id" : "222222222222222222" } ] }
Required params:
- APIKey : apiKey you’ve received on our website
- SecretKey : secretKey for data sensitive operations
- action [= accounts]: Define the operation
Response fields:
- connected : Array of available accounts
- type : Social Network shortcut (Facebook => fb, Twitter => tw, ..)
- email : Email specific account uses
- id : Social Network Account ID
Get Pages
If applicable ( in cases social network has pages, e.g. facebook ), we can fetch a list of available pages for specific account:
$ curl -X POST "https://www.revivify.social/account/API?apiKey=[API_KEY]&account=[ACCOUNT_ID]&page_id=[PAGE_ID]&action=pages" { "pages" : [ { "id" : "111111111111111111", "name" : "Test Page 1" }, { "id" : "222222222222222222", "name" : "Test Page 2" } ] }
Required params:
- APIKey : apiKey you’ve received on our website
- accountID : Social Network Account ID for which we’re fetching the pages for
- action [= pages] : Define the operation
Response fields:
- pages : Array of available pages for requested account
- name : page name (if available)
Sharing Content
Here we have a number of variations when it comes to posting:
- Message
- Message + Link
- Message + Photo
- Link
- Photo
Message
Posting a message to specific page or account:
$ curl -X POST "https://www.revivify.social/account/API?apiKey=[API_KEY]&account=[ACCOUNT_ID]&page_id=[PAGE_ID]&action=publish" --data-urlencode "message=ReVivify Social Test Message" $ curl -d '{ "action":"publish" , "apiKey":"[API_KEY]", "account":"[ACCOUNT_ID]", "page_id":"[PAGE_ID]", "message":"ReVivify Social Test Message"}' -H "Content-Type: application/json" -X POST https://www.revivify.social/account/API { "result":"true", "publish_id":"1277337010760531969" }
Required params:
- APIKey : apiKey you’ve received on our website
- accountID : Social Network Account ID for which we’re fetching the pages for
- pageID : Social Network Account’s page ID (if applicable)
- message : The message or status you would like to share / publish (URL Encode)
- action [= publish] : Define the operation
Response fields:
- result : Operation response
- published : successfully published content
- error : Something went wrong, publishing incomplete
- publish_id : Post ID provided by social network
Message + Link
Posting a message to specific page or account:
$ curl -X POST "https://www.revivify.social/account/API?apiKey=[API_KEY]&account=[ACCOUNT_ID]&page_id=[PAGE_ID]&action=publish&link=https://www.revivify.social" --data-urlencode "message=ReVivify Social Test Message" $ curl -d '{ "action":"publish" , "apiKey":"[API_KEY]", "account":"[ACCOUNT_ID]", "page_id":"[PAGE_ID]", "link":"https://www.revivify.social", "message": "ReVivify Social Test Message"}' -H "Content-Type: application/json" -X POST https://www.revivify.social/account/API { "result":"true", "publish_id":"1277337010760531969" }
Required params:
- APIKey : apiKey you’ve received on our website
- accountID : Social Network Account ID for which we’re fetching the pages for
- pageID : Social Network Account’s page ID (if applicable)
- message : The message or status you would like to share / publish (URL Encode)
- link : The link (full URL) you want to share / publish
- action [= publish] : Define the operation
Response fields:
- result : Operation response
- published : successfully published content
- error : Something went wrong, publishing incomplete
- publish_id : Post ID provided by social network
Message + Photo
Posting a message with the link (including metadata) to specific page or account.
$ curl -X POST -F "file=@abstract-skulls_00427677.jpg" "https://www.revivify.social/account/API?apiKey=[API_KEY]&account=[ACCOUNT_ID]&page_id=[PAGE_ID]&action=publish&message=ReVivify%20Social%20Test%20Message" { "result":"true", "publish_id":"1277337010760531969" }
Required params:
- APIKey : apiKey you’ve received on our website
- accountID : Social Network Account ID for which we’re fetching the pages for
- pageID : Social Network Account’s page ID (if applicable)
- message : The message or status you would like to share / publish (Don’t forget URL Encode)
- photo : uploading a file, multipart/form-data
- action [= publish] : Define the operation
Response fields:
- result : Operation response
- true : successfully published content
- false : Something went wrong, publishing incomplete
- publish_id : Post ID provided by social network
Link
Posting a link (URL) to specific page or account:
$ curl -X POST "https://www.revivify.social/account/API?apiKey=[API_KEY]&account=[ACCOUNT_ID]&page_id=[PAGE_ID]&action=publish&link=https://www.revivify.social" $ curl -d '{ "action":"publish" , "apiKey":"[API_KEY]", "account":"[ACCOUNT_ID]", "page_id":"[PAGE_ID]", "link":"https://www.revivify.social"}' -H "Content-Type: application/json" -X POST https://www.revivify.social/account/API { "result":"true", "publish_id":"1277337010760531969" }
Required params:
- APIKey : apiKey you’ve received on our website
- accountID : Social Network Account ID for which we’re fetching the pages for
- pageID : Social Network Account’s page ID (if applicable)
- link : The link (full URL) you want to share / publish
- action [= publish] : Define the operation
Response fields:
- result : Operation response
- true : successfully published content
- error : Something went wrong, publishing incomplete
- publish_id : Post ID provided by social network
Photo
Posting or uploading a photo to a specific page or account.
$ curl -X POST -F "file=@abstract-skulls_00427677.jpg" "https://www.revivify.social/account/API?apiKey=[API_KEY]&account=[ACCOUNT_ID]&page_id=[PAGE_ID]&action=publish" { "result":"true", "publish_id":"1277337010760531969" }
Required params:
- APIKey : apiKey you’ve received on our website
- accountID : Social Network Account ID for which we’re fetching the pages for
- pageID : Social Network Account’s page ID (if applicable)
- photo : uploading a file, multipart/form-data
- action [= publish] : Define the operation
Response fields:
- result : Operation response
- published : successfully published content
- error : Something went wrong, publishing incomplete
- publish_id : Post ID provided by social network
UnPublishing
In case you need unpublishing use “action=unpublish” with the appropriate “post_id” tag:
$ curl -X POST "https://www.revivify.social/account/API?apiKey=[API_KEY]&account=[ACCOUNT_ID]&page_id=[PAGE_ID]&action=unpublish&post_id=[POST_ID]" $ curl -d '{ "action":"unpublish" , "apiKey":"[API_KEY]", "account":"[ACCOUNT_ID]", "page_id":"[PAGE_ID]", "post_id":"[POST_ID]"}' -H "Content-Type: application/json" -X POST https://www.revivify.social/account/API { "result":"true", "publish_id":"1277337010760531969" }
Required params:
- apiKey : apiKey you’ve received on our website
- account : Social Network Account ID for which we’re fetching the pages for
- page_id : Social Network Account’s page ID (if applicable)
- post_id : Usually page_id + post_id
- action [= unpublish] : Define the operation
Response fields:
- result : Operation response
- true : successfully unpublished content
- false : Something went wrong, unpublishing incomplete
- publish_id : Post ID provided by social network