API
API settings let you integrate the various APIs available into the Scriptcase. Through this interface it is possible to configure email sending, SMS and Online Payment APIs.
APIs List
On access you can view a list of all the APIs already configured.
- Name: Configured API Name.
- Getaway: Getaway used to send the email.
Email APIs
Scriptcase connects to three different APIs for sending emails: SMTP, Mandrill, and Amazon SES.
SMTP Configuration
SMTP is the standard protocol for sending e-mails over the Internet, and each provider has its SMTP.
For more information about SMTP settings click here
API
It allows you to select an API already configured in Tools > API or set a new one here by selecting - custom -. In this case, you see some options according to the selected Gateway.
Gateway
Select the way to send the email. The SMTP is the default protocol for sending e-mails over the Internet, and each provider has its SMTP.
SMTP Server
SMTP server address for the provider.
Port SMTP
Port used by the mail server. Use port 465 for security with SSL, port 587 for security with TLS, or port 25 as port without security. By omitting the value, Scriptcase defaults to 25.
User SMTP
SMTP server user.
Enter SMTP
SMTP server user password.
Protocol SMTP
Defines the security protocol. By omitting the value, Scriptcase uses the default value.
Enter the origin email, that is the email sender.
Name
The sender’s name displayed in the email.
Mandrill Configurations
Mandrill is a transactional email API for MailChimp users, ideal for sending data-driven emails.
API
It allows you to select an API already configured in Tools > API or set a new one here by selecting - custom -. In this case, you see some options according to the selected Gateway.
Gateway
Select the way to send the email. Mandrill is a transactional email API for MailChimp users, ideal for sending data-driven emails.
API KEY
Enter the key obtained from the origin site of your API.
Enter the origin email, that is the email sender.
Name
The sender’s name displayed in the email.
For more information about mandrill
Amazon SES Configurations
Amazon Simple Email Service Amazon SES is an email sending service designed to assist in sending marketing emails, notifications, and transactional messages.
API KEY
Enter the key obtained from the origin site of your API.
API Secret
Enter the secret access key of your account.
Region
Amazon SES has endpoints in many countries, to reduce network latency, inform the region of the endpoint closest to your application. See the regions.
Enter the origin email, that is the email sender.
Name
The sender’s name displayed in the email.
For more information about Amazon SES
SMS APIs
Scriptcase connects to different APIs for sending SMS text messages:
Setting up Twilio API
Twilio is a set of libraries that enables SMS communication on a global scale. For correct configuration, we need to enter the data of Authentication ID, Authentication Token, and Sender, as shown below:
Name
Enter a name for your API;
Gateway
The Gateway we want to use. (in this case, Twilio);
Auth ID
Enter the authentication ID for your Twilio account;
Auth Token
Enter the authentication Token for your Twilio account;
From
Enter the sender’s number to send the SMS;
Setting up Plivo API
Name
Enter a name for your API;
Gateway
The Gateway we want to use. (in this case,Plivo);
Auth ID
Enter the authentication ID of your Plivo account;
Token ID
Enter the authentication Token of your Plivo account;
From
Enter the sender number to send the SMS;
Setting up Clickatell API
Name
Enter a name for your API;
Gateway
The Gateway we want to use. (in this case, Clickatell);
Auth Token
Enter the authentication Token of your Clickatell account;
Watch bellow a video with an example for SMS notifications:
Whatsapp APIs
We use the ChatAPI for sending messages through WhatsApp.
Chat API
First, we should [access the ChatAPI website][get_token_chatapi]{:target=’blank’} to get the data information for the API configuration in Scriptcase.
With the data in hand, go to the Tools> API menu to access the settings screen (as shown below in the image).
Name
Enter a name to identify the configured API. We recommend to use a name that identifies the data of configuration since it is possible to create more than one API with this Gateway.
Mode
Defines the API access level: Public, where all users of all projects have access to this API; Project, where all users of this project have access to this API; User, where only the user creating the API has access to this API.
Gatway
Enter the Gateway to use. We must select Chat api.
- URL - URL required for sending a message
Auth Token
Enter the Token obtained from the settings of the API origin site. [Visit the ChatAPI website to get your token.][get_token_chatapi]{:target=’blank’}
After configuring the API, we must use the macro macro sc_whatsapp (); to complete the information to send the message.
Check the macro syntax below:
sc_send_whatsapp (['profile' => 'api_chatapi',
'message' => 'Message to be sent',
'to' => '558182499699']);
Watch a video showing an example with ChatAPI:
Payment APIs
Scriptcase allows using APIs for online payment processing. The following API integrations are available:
Setting up PayPal
Name
Enter a name for your API;
Gateway
Enter the Gateway to use (For example, paypal_express);
Username
Enter the user of PayPal account for authentication;
Password
Enter the password of PayPal account for authentication;
Signature
Enter the signature of PayPal account for authentication;
Test Mode
It allows you to use the API as a test mode.
Storage APIs
The scriptcase provides 3 APIs for this type of service. It only works in fields of type: image (image file name) and document (document file name).
- Dropbox
- Google Drive
- S3
Configuring the dropbox API
Dropbox is a service for storing and sharing files. It is based on the concept of “cloud computing”. It belongs to Dropbox Inc., based in San Francisco, California, USA. The company that developed the program provides computer centers that store its customers’ files.
To learn how to configure your API key click here
-
Name: Defines the name that will identify the configured API. We recommend that the name be defined in a way that allows identifying the data used in the configuration, since it is possible to create more than one API with this Gateway, this way it will be simpler to identify the API at the time of the call.
-
Mode: Defines the access level of this API, which are: Public, where all users of all projects have access to this API; Project, where all users of this project will have access to this API; User, where only the user who created the API will have access to any project. (Advisable for this API the project level).
-
Gateway: Defines the API to be used. We must select Dropbox.
-
API Key: Enter the key obtained when configuring your API.
-
API Secret: Enter the secret access key for your account.
-
Access Token: Enter the access Token generated in your Dropbox account.
Google Drive
Google Drive is a virtual disk service launched by Google. The service allows the storage of files in the Google cloud.
To learn how to configure your API key click here
-
Name: Defines the name that will identify the configured API. We recommend that the name be defined in a way that allows identifying the data used in the configuration, since it is possible to create more than one API with this Gateway, this way it will be simpler to identify the API at the time of the call.
-
Mode: Defines the access level of this API, which are: Public, where all users of all projects have access to this API; Project, where all users of this project will have access to this API; User, where only the user who created the API will have access to any project. (Advisable for this API the project level).
-
Gateway: Defines the API to be used. We must select Google drive.
-
Application Name: Name of the application to be used.
-
Json OAuth: Enter the contents of the generated user authentication file.
-
authentication code: Enter the identification code obtained when configuring your API.
Amazon S3
Amazon Simple Storage Service (Amazon S3) is an object storage service that offers industry-leading scalability, data availability, security and performance. This means that customers of all sizes and sectors can use it to store any amount of data in a wide variety of use cases, such as websites, mobile applications, backup and restore, archiving, business applications, IoT devices and analytics of big data.
To learn how to configure your API key click here
-
API Key: Enter the key obtained when configuring your API.
-
API Secret: Enter the secret access key for your account.
-
Region: Amazon SES has endpoints in several regions, in order to reduce network latency, inform the endpoint region closest to your application.
-
Bucket: Inform the bucket to store files on Amazon S3.
Authenticate APIs - Google Authenticate
This google authentication API allows you to create more secure systems using two-factor authentication.
To use this API it is necessary to install the Google Authenticator application on your mobile device.
For API configuration We must inform:
Name
Used only for API identification within the tool.
Mode
This option defines the availability of the API within Scriptcase. The configuration options are:
- Public - With this option all projects and users of the tool will have access to this API for use.
- Project - When saving the API at the project level, all users of the project will have access to this API for use.
- User - Only the user who performed the API configuration will have access to its use in any project.
The resource can only be adopted in the project where it was created, regardless of the chosen save mode.
Gateway
Defines the authentication API that will be used.
Domain
Defines the domain enabled to use two-factor authentication.
Examples:
- myscriptcase.com.br
- 127.0.0.1
We must inform only one domain to use the API.