Sendible API

Getting Started

Hello Developers

The Sendible API can be used to build non-automated, authentic, high-quality apps and services that:

  • Help individuals share their content on social networks and blogs.
  • Help brands understand their social media effectiveness.
  • Help publishers curate and discover content.

To get started, register as a developer. Once you've signed up, you will receive an email containing the following:

  • Your Sendible login details
  • Your Application ID
  • Your API Key

Then, dive into the documentation and start building!

Authentication

The Sendible API uses a custom protocol similar to OAuth 2.0 for simple, but effective authentication and authorization. Please note that all requests to the API must be made over SSL (https:// not http://).

Do you need to authenticate?

The Sendible API requires authentication for almost all requests. Authenticated requests require either an access_token or an api_key. These tokens are unique to a user and should be stored securely. Access tokens are short-lived and are set to expire.

Basic Authentication

We support Basic Authentication using your Sendible username and API key or password. You can also include these parameters in the querystring as follows: username=[username]&api_key=[api_key]

If you are an existing Sendible customer or you're building an application for one of our users, you can locate the Sendible api_key within Settings > Preferences > System Settings > Access Keys.

If you are not yet a user, you will receive your API key and application ID after registering as a developer.

Receiving an access_token

In order to receive an access_token, you must do the following:

  • Direct the user to our authorization url.
  • The server will redirect the user in one of 3 ways that you choose:
    • Server-side flow (recommended): We include the access_token as part of the querystring and send it back to your server.
    • Client-side flow: We include the access_token as a fragment (#) in the URL. This method is less secure, but allows applications without any server component to receive an access_token.
    • oAuth2 (Implicit) Authentication: We include the access_token as a fragment (#) in the URL. We will include the access_token as part of the redirect URL once a user has authenticated.

Server-side (Explicit) Flow

Using the server-side flow is quite easy. Simply follow these steps:

Step One: Direct your user to our authorization URL

https://api.sendible.com/api/v2/auth?application_id=APPLICATION_ID&redirect_uri=REDIRECT_URI&source=server

At this point, we present the user with a login screen to Sendible.

Step Two: Receive the redirect from Sendible

Once a user logs in, we issue a redirect to your redirect_uri with the access_token parameter to use in step three. We will also pass you the username of the authenticated user.

Step Three: Store the access_token

Your application will receive the access_token and username of the authenticated user as querystring parameters. These should be stored so that API requests can be made on behalf of the authenticated user.

Client-side Authentication

If you are building an app that does not have a server component (a purely javascript app, for instance), we provide the Implicit Authentication Flow.:

Step One: Direct your user to our authorization URL

https://api.sendible.com/api/v2/auth?application_id=APPLICATION_ID&redirect_uri=REDIRECT_URI&source=client

At this point, we present the user with a login screen to Sendible.

Step Two: Receive the redirect from Sendible

Once a user logs in, we issue a redirect to your redirect_uri with the access_token and username in the url fragment. It will look like this: http://your-redirect-uri#ACCESS_TOKEN,USERNAME

We append the username of the authenticated user to the last section, separated with comma.

Step Three: Store the access_token

Simply grab the access_token and username off the URL fragment and you’re good to go.

oAuth2 (Implicit) Authentication

Step One: Direct your user to our authorization URL

https://api.sendible.com/login?client_id=APPLICATION_ID&redirect_uri=REDIRECT_URI&state=STATE

  • APPLICATION_ID: Your Sendible application ID
  • REDIRECT_URI: The URI that Sendible will redirect the user back to.
  • STATE: The state is a random value that will be passed back to your REDIRECT_URI to confirm that the response came from the correct location.

At this point, we present the user with a login screen to Sendible.

Step Two: Receive the redirect from Sendible

Once a user logs in, we issue a redirect to your redirect_uri with the access_token and state in the url fragment. It will look like this: http://your-redirect-uri#access_token=ACCESS_TOKEN&state=STATE&token_type=Bearer

Step Three: Store the access_token

Simply grab the access_token off the URL fragment and you’re good to go.