All URIs are relative to https://api.smooch.io
Method | HTTP request | Description |
---|---|---|
create_app_key | POST /v2/apps/{appId}/keys | Create App Key |
delete_app_key | DELETE /v2/apps/{appId}/keys/{keyId} | Delete App Key |
get_app_key | GET /v2/apps/{appId}/keys/{keyId} | Get App Key |
list_app_keys | GET /v2/apps/{appId}/keys | List App Keys |
AppKeyResponse create_app_key(app_id, app_key_create_body)
Create App Key
Creates an API key for the specified app. The response body will include a secret as well as its corresponding id, which you can use to generate JSON Web Tokens to securely make API calls on behalf of the app.
Basic Authentication (basicAuth):
from __future__ import print_function
import time
import sunshine_conversations_client
from sunshine_conversations_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.smooch.io
# See configuration.py for a list of all supported configuration parameters.
configuration = sunshine_conversations_client.Configuration(
host = "https://api.smooch.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure Bearer authorization (JWT): bearerAuth
# Uncomment this if you want to use JWTs
#configuration.access_token = 'YOUR_BEARER_TOKEN'
# Enter a context with an instance of the API client
with sunshine_conversations_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sunshine_conversations_client.AppKeysApi(api_client)
app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.
app_key_create_body = sunshine_conversations_client.AppKeyCreateBody() # AppKeyCreateBody |
try:
# Create App Key
api_response = api_instance.create_app_key(app_id, app_key_create_body)
pprint(api_response)
except ApiException as e:
print("Exception when calling AppKeysApi->create_app_key: %s\n" % e)
Bearer (JWT) Authentication (bearerAuth):
from __future__ import print_function
import time
import sunshine_conversations_client
from sunshine_conversations_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.smooch.io
# See configuration.py for a list of all supported configuration parameters.
configuration = sunshine_conversations_client.Configuration(
host = "https://api.smooch.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure Bearer authorization (JWT): bearerAuth
# Uncomment this if you want to use JWTs
#configuration.access_token = 'YOUR_BEARER_TOKEN'
# Enter a context with an instance of the API client
with sunshine_conversations_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sunshine_conversations_client.AppKeysApi(api_client)
app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.
app_key_create_body = sunshine_conversations_client.AppKeyCreateBody() # AppKeyCreateBody |
try:
# Create App Key
api_response = api_instance.create_app_key(app_id, app_key_create_body)
pprint(api_response)
except ApiException as e:
print("Exception when calling AppKeysApi->create_app_key: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
app_id | str | Identifies the app. | |
app_key_create_body | AppKeyCreateBody |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | Created | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object delete_app_key(app_id, key_id)
Delete App Key
Removes an API key.
Basic Authentication (basicAuth):
from __future__ import print_function
import time
import sunshine_conversations_client
from sunshine_conversations_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.smooch.io
# See configuration.py for a list of all supported configuration parameters.
configuration = sunshine_conversations_client.Configuration(
host = "https://api.smooch.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure Bearer authorization (JWT): bearerAuth
# Uncomment this if you want to use JWTs
#configuration.access_token = 'YOUR_BEARER_TOKEN'
# Enter a context with an instance of the API client
with sunshine_conversations_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sunshine_conversations_client.AppKeysApi(api_client)
app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.
key_id = 'int_5d8cff3cd55b040010928b5b' # str | The id of the key.
try:
# Delete App Key
api_response = api_instance.delete_app_key(app_id, key_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling AppKeysApi->delete_app_key: %s\n" % e)
Bearer (JWT) Authentication (bearerAuth):
from __future__ import print_function
import time
import sunshine_conversations_client
from sunshine_conversations_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.smooch.io
# See configuration.py for a list of all supported configuration parameters.
configuration = sunshine_conversations_client.Configuration(
host = "https://api.smooch.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure Bearer authorization (JWT): bearerAuth
# Uncomment this if you want to use JWTs
#configuration.access_token = 'YOUR_BEARER_TOKEN'
# Enter a context with an instance of the API client
with sunshine_conversations_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sunshine_conversations_client.AppKeysApi(api_client)
app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.
key_id = 'int_5d8cff3cd55b040010928b5b' # str | The id of the key.
try:
# Delete App Key
api_response = api_instance.delete_app_key(app_id, key_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling AppKeysApi->delete_app_key: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
app_id | str | Identifies the app. | |
key_id | str | The id of the key. |
object
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Ok | - |
404 | App not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AppKeyResponse get_app_key(app_id, key_id)
Get App Key
Returns an API key.
Basic Authentication (basicAuth):
from __future__ import print_function
import time
import sunshine_conversations_client
from sunshine_conversations_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.smooch.io
# See configuration.py for a list of all supported configuration parameters.
configuration = sunshine_conversations_client.Configuration(
host = "https://api.smooch.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure Bearer authorization (JWT): bearerAuth
# Uncomment this if you want to use JWTs
#configuration.access_token = 'YOUR_BEARER_TOKEN'
# Enter a context with an instance of the API client
with sunshine_conversations_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sunshine_conversations_client.AppKeysApi(api_client)
app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.
key_id = 'int_5d8cff3cd55b040010928b5b' # str | The id of the key.
try:
# Get App Key
api_response = api_instance.get_app_key(app_id, key_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling AppKeysApi->get_app_key: %s\n" % e)
Bearer (JWT) Authentication (bearerAuth):
from __future__ import print_function
import time
import sunshine_conversations_client
from sunshine_conversations_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.smooch.io
# See configuration.py for a list of all supported configuration parameters.
configuration = sunshine_conversations_client.Configuration(
host = "https://api.smooch.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure Bearer authorization (JWT): bearerAuth
# Uncomment this if you want to use JWTs
#configuration.access_token = 'YOUR_BEARER_TOKEN'
# Enter a context with an instance of the API client
with sunshine_conversations_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sunshine_conversations_client.AppKeysApi(api_client)
app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.
key_id = 'int_5d8cff3cd55b040010928b5b' # str | The id of the key.
try:
# Get App Key
api_response = api_instance.get_app_key(app_id, key_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling AppKeysApi->get_app_key: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
app_id | str | Identifies the app. | |
key_id | str | The id of the key. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Ok | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AppKeyListResponse list_app_keys(app_id)
List App Keys
Lists all API keys for a given app.
Basic Authentication (basicAuth):
from __future__ import print_function
import time
import sunshine_conversations_client
from sunshine_conversations_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.smooch.io
# See configuration.py for a list of all supported configuration parameters.
configuration = sunshine_conversations_client.Configuration(
host = "https://api.smooch.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure Bearer authorization (JWT): bearerAuth
# Uncomment this if you want to use JWTs
#configuration.access_token = 'YOUR_BEARER_TOKEN'
# Enter a context with an instance of the API client
with sunshine_conversations_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sunshine_conversations_client.AppKeysApi(api_client)
app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.
try:
# List App Keys
api_response = api_instance.list_app_keys(app_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling AppKeysApi->list_app_keys: %s\n" % e)
Bearer (JWT) Authentication (bearerAuth):
from __future__ import print_function
import time
import sunshine_conversations_client
from sunshine_conversations_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.smooch.io
# See configuration.py for a list of all supported configuration parameters.
configuration = sunshine_conversations_client.Configuration(
host = "https://api.smooch.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure Bearer authorization (JWT): bearerAuth
# Uncomment this if you want to use JWTs
#configuration.access_token = 'YOUR_BEARER_TOKEN'
# Enter a context with an instance of the API client
with sunshine_conversations_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sunshine_conversations_client.AppKeysApi(api_client)
app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.
try:
# List App Keys
api_response = api_instance.list_app_keys(app_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling AppKeysApi->list_app_keys: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
app_id | str | Identifies the app. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Ok | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]