Membuat aplikasi.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ram:CreateApplication |
create |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| DisplayName |
string |
Yes |
Nama tampilan aplikasi. Panjangnya dapat mencapai 24 karakter. |
myapp |
| AppType |
string |
Yes |
Tipe aplikasi. Nilai valid:
|
WebApp |
| RedirectUris |
string |
No |
URL pengalihan aplikasi. Untuk menentukan beberapa URL, pisahkan dengan titik koma (;). |
https://www.example.com |
| SecretRequired |
boolean |
No |
Apakah akan memerlukan rahasia. Nilai valid:
Catatan
|
true |
| AccessTokenValidity |
integer |
No |
Periode validitas token akses. Nilai valid: 900 hingga 10800. Unit: detik. Nilai default: 3600. |
3600 |
| RefreshTokenValidity |
integer |
No |
Periode validitas Token penyegaran. Nilai valid: 7200 hingga 31536000. Unit: detik. Nilai default:
|
2592000 |
| PredefinedScopes |
string |
No |
Cakupan (dalam OAuth) izin aplikasi. Untuk informasi lebih lanjut tentang cakupan (dalam OAuth) izin aplikasi, lihat Ikhtisar OAuth. Anda juga dapat memanggil operasi ListPredefinedScopes untuk mendapatkan cakupan (dalam OAuth) yang didukung oleh berbagai tipe aplikasi. Untuk menentukan beberapa izin, pisahkan dengan titik koma (;). |
aliuid;profile |
| RequiredScopes |
string |
No |
Izin yang diperlukan. Anda dapat menentukan satu atau beberapa izin untuk parameter RequiredScopes. Saat pengguna memberikan izin kepada aplikasi, cakupan (dalam OAuth) yang ditentukan dalam parameter ini akan dipilih sebelumnya dan tidak dapat dihapus pilihannya. Untuk menentukan beberapa cakupan (dalam OAuth), pisahkan dengan titik koma (;). Catatan
Cakupan (dalam OAuth) apa pun yang ditentukan di sini juga harus disertakan dalam PredefinedScopes. Jika tidak, cakupan (dalam OAuth) tidak akan diatur sebagai wajib. |
aliuid |
| IsMultiTenant |
boolean |
No |
Apakah aplikasi dapat diinstal oleh akun Alibaba Cloud lainnya. Nilai valid:
|
false |
| AppName |
string |
No |
Nama aplikasi. Panjangnya dapat mencapai 64 karakter dan dapat berisi huruf, digit, periode (.), garis bawah (_), dan tanda hubung (-). |
myapp |
| ProtocolVersion |
string |
No |
Versi protokol OAuth aplikasi. Nilai valid:
Nilai default: |
2.0 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
6616F09B-2768-4C11-8866-A8EE4C4A583E |
| Application |
object |
The application information. |
|
| DisplayName |
string |
The display name of the application. |
myapp |
| AccessTokenValidity |
integer |
The validity period of the access token. Unit: seconds. |
3600 |
| SecretRequired |
boolean |
Indicates whether a secret is required. |
true |
| AccountId |
string |
The ID of the Alibaba Cloud account to which the application belongs. |
177242285274**** |
| CreateDate |
string |
The time when the application was created. |
2020-10-23T08:06:57Z |
| AppName |
string |
The application name. |
myapp |
| RedirectUris |
object |
The redirect URLs. |
|
| RedirectUri |
array |
The webhook address. |
|
|
string |
The webhook address. |
https://www.example.com |
|
| UpdateDate |
string |
The time when the application information was last updated. |
2020-10-23T08:06:57Z |
| DelegatedScope |
object |
The information about the permissions that are granted on the application. |
|
| PredefinedScopes |
object |
||
| PredefinedScope |
array<object> |
The information about the application scopes. |
|
|
object |
The information about the application scopes. |
||
| Description |
string |
The description of the scope. |
Obtain the OpenID of the user. This is the default permission that you cannot remove. |
| Required |
boolean |
Indicates whether the scope is required by default when the application is installed. Valid values:
The |
true |
| Name |
string |
The name of the scope. |
openid |
| AppId |
string |
The application ID. |
472457090344041**** |
| RefreshTokenValidity |
integer |
The validity period of the refresh token. Unit: seconds. |
7776000 |
| IsMultiTenant |
boolean |
Indicates whether the application can be installed by using other Alibaba Cloud accounts. |
true |
| AppType |
string |
The application type. |
WebApp |
| ProtocolVersion |
string |
The OAuth protocol version of the application. Valid values:
|
2.0 |
Contoh
Respons sukses
JSONformat
{
"RequestId": "6616F09B-2768-4C11-8866-A8EE4C4A583E",
"Application": {
"DisplayName": "myapp",
"AccessTokenValidity": 3600,
"SecretRequired": true,
"AccountId": "177242285274****",
"CreateDate": "2020-10-23T08:06:57Z",
"AppName": "myapp",
"RedirectUris": {
"RedirectUri": [
"https://www.example.com"
]
},
"UpdateDate": "2020-10-23T08:06:57Z",
"DelegatedScope": {
"PredefinedScopes": {
"PredefinedScope": [
{
"Description": "Obtain the OpenID of the user. This is the default permission that you cannot remove.",
"Required": true,
"Name": "openid"
}
]
}
},
"AppId": "472457090344041****",
"RefreshTokenValidity": 7776000,
"IsMultiTenant": true,
"AppType": "WebApp",
"ProtocolVersion": "2.0"
}
}
Kode kesalahan
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.