Julep Connector

In order to use Julep connector, you need to follow the steps below.

1. Connecting to Julep through API console.

Visit API console. Scroll to connectors section. Choose Julep and enter your username and password. Your credentials will be secured safely.

2. Make a test call

To make sure your credentials work with the api.audio; you can make a test call. You can use console visual interface, an api call or SDKs.

curl https://v1.api.audio/connector/Julep -H "x-api-key: <<apiKey>>"
import apiaudio

connector_status = apiaudio.Connector.retrieve('Julep')
print(connector_status)
import apiaudio from "apiaudio"

apiaudio.Connector.retrieve("Julep").then(console.log).catch(console.log)

3. Find your Julep podcast id

Go to Julep and create your podcast. Then when you go the details of the podcast, you can see the podcast id.

Finding your podcast id is quite easyFinding your podcast id is quite easy

Finding your podcast id is quite easy

The parameters you need are podcast id, episode title and episode permalink.

4. Create a mastering file with connectors flag

After making sure your credentials work, you are good to create a mastering file and upload to Julep. You need to follow the same steps as you were creating a regular mastering track.

All you need to do is to add connectors flag on top of the mastering parameters.

🚧

Connectors flag

It should be an array of connector objects with each of them having name attribute at least. For Julep integration, we also need podcastId, title and permalink parameters.
Example:

"connectors": [
      {
        "name": "Julep",
        "podcastId": "383",
        "title": "my episode title",
        "permalink": "episode-permalink"
      }
]

So for each platform, mastering calls turn into something similar to this:

curl --location --request POST 'https://v1.api.audio/mastering' \
--header 'x-api-key: <<apiKey>>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "scriptId": "SCRIPTID",
    "soundTemplate": "parisianmorning",
    "connectors": [
      {
        "name": "Julep",
        "podcastId": "383",
        "title": "my episode title",
        "permalink": "episode-permalink"
      }
    ]
}'
import apiaudio

apiaudio.Mastering().create(
    scriptId="scriptId",
    soundTemplate="parisianmorning",
    connectors=[
      {
        'name': 'Julep',
        'podcastId': '383',
        'title': 'my episode title',
        'permalink': 'episode-permalink'
      }
    ]
)
import apiaudio from "apiaudio"

apiaudio.Mastering.create({
    scriptId: "scriptId",
    soundTemplate: "parisianmorning",
    connectors: [
      {
        "name": "Julep",
        "podcastId": "383",
        "title": "my episode title",
        "permalink": "episode-permalink"
      }
    ]
})
.then(console.log)
.catch(console.log)

5. Checking the status of a connection

When there is a connectors flag in the mastering call, it will return something like the following:

{
  connectionId: '88b6051a-c7b5-4690-ad89-09e8394eb9cc',
  message: 'Salih1011_*Aflorithmic-98806b19/default/default/short5/v0/short5.mp3 has been saved in S3 and has been removed: True',
  url: 'https://staging-v1.api.audio/url/fc153/short5.mp3',
  warnings: ''
}

The connectionId variable here is designed for you to keep track of the connection status. You can use the API or SDKs to get the connection status.

curl https://v1.api.audio/connection/{{connectionId}} -H "x-api-key: <<apiKey>>"
import apiaudio

connection_status = apiaudio.Connector.connection('{{connectionId}}')
print(connection_status)
import apiaudio from "apiaudio"

apiaudio.Connector.connection("{{connectionId}}").then(console.log).catch(console.log)

The query for connection status will return a list with connection status, connector name, error message or status message.

Possible status codes are the following:

  • REQUEST_MADE: When the request is first received.
  • PARAMETER_ERROR: When there is a problem with the parameters passed that blocks initiating the connection or processing it. The error parameter will help you understand what to change.
  • CONNECTION_STARTED: After the parameter check is done and just before checking the connector credentials.
  • CONNECTION_ERROR: If there is a problem with retrieving the connector credentials, make sure you put them through the API console and test them.
  • UPLOAD_STARTED: After checks are done and when the API is about to start the upload.
  • UPLOAD_FINISHED: When the connection is successfully finished.
  • UPLOAD_FAILED: When the upload failed because of an 3rd party api error.
  • INTERNAL_FILE_ERROR: When there is an internal error with retrieving produced file in the api.audio.
Congrats! You successfully uploaded and encoded your file on Julep.Congrats! You successfully uploaded and encoded your file on Julep.

Congrats! You successfully uploaded and encoded your file on Julep.

📘

Multiple connectors

You can pass more than one object to connectors flag and have your produced file uploaded to all of them at the same time. Just pass more data to the list;

"connectors": [
      {
        "name": "Julep",
        "podcastId": "383",
        "title": "my episode title",
        "permalink": "episode-permalink"
      },
      {
        "name": "Julep",
        "podcastId": "385",
        "title": "my second episode title for another podcast",
        "permalink": "second-episode-permalink"
      },
      {
        "name": "Some other connector",
        "podcastId": "7890"
      }
]

Did this page help you?