Image API
Image API v4 provides image API functionality.
Call validation
For details, see the REST API Overview description of Authentication Method.
OPPO Image Upload
Call address
POST v4/image/oppo
POST v4/image/oppo
This code block in the floating window
Request Example
Request Header
> POST /v4/image/oppo HTTP/1.1
> Authorization: Basic Yzk2ZjQyZTBkMmU2NjJlNDVkMDM1YWIxOmRmNGQ1OWU4NGVhYzJmOWQ1M2IzNmYxMg==
> POST /v4/image/oppo HTTP/1.1
> Authorization: Basic Yzk2ZjQyZTBkMmU2NjJlNDVkMDM1YWIxOmRmNGQ1OWU4NGVhYzJmOWQ1M2IzNmYxMg==
This code block in the floating window
Request Body
{
"big_picture_url" : "",
"small_picture_url": ""
}
{
"big_picture_url" : "",
"small_picture_url": ""
}
This code block in the floating window
Request Parameters
| Keyword | Type | Option | Meaning |
|---|---|---|---|
| big_picture_url | String | Optional | |
| small_picture_url | String | Optional |
Return Parameters
| Keyword | Type | Option | Meaning |
|---|---|---|---|
| big_picture_id | String | Optional | Large image id |
| small_picture_id | String | Optional | Small icon id |
Return Example
Success
< HTTP/1.1 200 OK
< Content-Type: application/json
{
"big_picture_id": "",
"small_picture_id": ""
}
< HTTP/1.1 200 OK
< Content-Type: application/json
{
"big_picture_id": "",
"small_picture_id": ""
}
This code block in the floating window
Failure
{
"error": {
"code": 21003,
"message": "Parameter value is invalid"
}
}
{
"error": {
"code": 21003,
"message": "Parameter value is invalid"
}
}
This code block in the floating window
Call returns
HTTP Status Code
Reference: HTTP-Status-Code
Error Code
| Code | Description | Detailed Explanation | HTTP Status Code |
|---|---|---|---|
| 0 | success | Success | 200 |
| 21001 | The method is not supported or url err | Wrong request method (GET/POST) or wrong url (interface does not exist) | 404 |
| 21003 | Parameter value is invalid | Invalid parameter value | 400 |
| 23001 | Basic authentication failed | HTTP Basic authorization failed | 401 |
| 23002 | Missing parameter! | Missing required parameter | 400 |
| 23100 | server error | Internal system error | 500 |
| 27000 | Server response time out, please try again later | Internal system error | 500 |
| 51 | Picture Size Exceeds | OPPO returned error. Generally the image exceeds the limit, please try another image | 200 |
