# InnoPaaS API Getting Started Guide

## API Signature Verification Instructions

### Common Request Headers

To ensure API security, all endpoints must include security verification headers,

where Authorization and AppKey can only be obtained after creating an AppKey on the InnoPaaS platform

used for API authentication and validation; if validation fails, the API cannot be called and an authentication failure will be returned.

<table data-header-hidden><thead><tr><th width="97.7890625"></th><th width="142.16796875"></th><th width="111.828125"></th><th width="133.48046875"></th><th></th></tr></thead><tbody><tr><td>No.</td><td>Field</td><td>Data Type</td><td>Required</td><td>Description</td></tr><tr><td>1</td><td>Content-Type</td><td>String</td><td>Yes</td><td>Value is "application/json;charset=utf-8"; request body is JSON</td></tr><tr><td>2</td><td>AppKey</td><td>String</td><td>Yes</td><td>ApiKey, application access KEY</td></tr><tr><td>3</td><td>Authorization</td><td>String</td><td>Yes</td><td>Application authorization access token</td></tr></tbody></table>

**Headers example code**

```python
headers = {
   'Authorization': 'YUIYIUIAIIASUDIAOSIDUOIWUOQWUEOIUWOEUQWOEUOQWUOUWOUWQOWU',
   'AppKey': 'XFbZY1rtTKo3UD4n1'
   }
```

### Obtain AppKey

Click the \[Copy] button in the app list to copy the AppKey

<figure><img src="https://170531697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fsbd17k8pYGOpOfBIUKqm%2Fuploads%2FdDXvlFRivYZ5x47MoOnd%2Fimage.png?alt=media&#x26;token=b0320a68-5527-4e8d-8ef0-49fa75074aab" alt=""><figcaption></figcaption></figure>

### Obtain Authorization

1\. Select the application and get the \[Token] button to produce the Authorization information required for the app to access APIs in production,**We do not store customers' token information; each generation will invalidate previously generated tokens. If the app's token is already used in your production environment, use this feature with caution. The old token becoming invalid may cause inability to access the API normally.**

<figure><img src="https://170531697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fsbd17k8pYGOpOfBIUKqm%2Fuploads%2Fx3aIULiWOaQsp4HP99q7%2Fimage.png?alt=media&#x26;token=045e1db0-eb29-4ff6-83bd-bdfa357fb406" alt=""><figcaption></figcaption></figure>

2\. Generate and copy the token

* Choose the token expiration time; default is never expires, but you can also specify an expiration date. &#x20;
* Click the \[Create Access Token] button to generate the token &#x20;
* Click the \[Copy] button to copy the token

<figure><img src="https://170531697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fsbd17k8pYGOpOfBIUKqm%2Fuploads%2FkFQSLeqOBzgsQLzQxqSn%2Fimage.png?alt=media&#x26;token=d849f6bc-c62d-4c81-a012-02c6f81e2750" alt=""><figcaption></figcaption></figure>

## Configure WebHook callback address

### Configure WebHook events

&#x20; **When pushing templates, uplink replies and other message events, if the app cannot be recognized or matched, the data will be pushed to the default application. If there is no default application, it will not be pushed.** &#x20;

1\. In the API Keys menu list, click the callback event configuration button to start configuration

<figure><img src="https://170531697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fsbd17k8pYGOpOfBIUKqm%2Fuploads%2FPjpLX7HMHkVCFf7ZPDBB%2Fimage.png?alt=media&#x26;token=62d6237f-6c33-4f41-9513-9379d937ada1" alt=""><figcaption></figcaption></figure>

2\. Click the \[Add] button to add

<figure><img src="https://170531697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fsbd17k8pYGOpOfBIUKqm%2Fuploads%2FInAgUHn1d2I3jvZRvPzp%2Fimage.png?alt=media&#x26;token=e2baafe5-3b10-42fa-9384-40e9158a0d34" alt=""><figcaption></figcaption></figure>

3\. Select the product from the available product list for which you need to configure the WebHook

<figure><img src="https://170531697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fsbd17k8pYGOpOfBIUKqm%2Fuploads%2FCqgUPRWrJNhz51S43VTk%2Fimage.png?alt=media&#x26;token=5d387c4e-b5af-4082-8dde-3ca48ca34b75" alt=""><figcaption></figcaption></figure>

4\. Configure the callback address and select the events to receive, then click Next to proceed

<figure><img src="https://170531697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fsbd17k8pYGOpOfBIUKqm%2Fuploads%2FdIkB7qagt3c1A6PwtRpw%2Fimage.png?alt=media&#x26;token=5dbb39f3-1d74-44ce-a29b-42991acf5b39" alt=""><figcaption></figcaption></figure>

5\. Select the callback request method, default is POST. If the customer's business system needs to verify the WebHook source, you can configure UserName and Authorization header information. When a WebHook notification is pushed, UserName and Authorization will be added to the headers and the customer's configured information will be pushed to the customer's syste&#x6D;**.**

<figure><img src="https://170531697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fsbd17k8pYGOpOfBIUKqm%2Fuploads%2FzGKPXZQ4bM9Ja4AFDlyM%2Fimage.png?alt=media&#x26;token=52655978-16a4-43e1-bedb-c67430fb4def" alt=""><figcaption></figcaption></figure>
