All Products
Search
Document Center

Drive and Photo Service:Authorize

Last Updated:Mar 21, 2025

Requests permissions by using OAuth 2.0.

Operation description

For more information, see "OAuth 2.0 For Web Server Applications" at OAuth 2.0 For Web Server Applications in User Guide.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request syntax

GET /v2/oauth/authorize HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
client_idstringYes

The application ID returned when the application was created.

47eUHhrzgWBvlLWj
redirect_uristringYes

The callback URL specified when the application was created.

https://www.aliyunpds.com/sign/callback
scopearrayNo

The requested permissions. By default, all permissions are requested.

stringNo

The requested permissions. You can request only all permissions on the application. Set the value to all or leave the parameter empty.

all
response_typestringYes

The format in which to return the response. Set the value to code.

code
statestringNo

The user-defined parameter to return in the callback URL after the requested permissions are granted.

customdata
login_typestringYes

The authentication method. Valid values:

  • default: all logon methods that are integrated on the default logon page provided by Drive and Photo Service.
  • ding: logs on by scanning a DingTalk QR code.
  • ding_sns: logs on by entering a DingTalk account and its password.
  • ram: logs on as an Alibaba Cloud Resource Access Management (RAM) user.
  • wechat: logs on by scanning a WeCom QR code.
  • wechat_app: logs on without authentication in WeCom.
default
hide_consentbooleanNo

Specifies whether to hide the consent page.

true

Response parameters

ParameterTypeDescriptionExample
The current API has no return parameters

Examples

Sample success responses

JSONformat

{}

Error codes

For a list of error codes, visit the Service error codes.