All Products
Search
Document Center

Drive and Photo Service:Authorize

Last Updated:May 26, 2026

Requests OAuth 2.0 authorization.

Operation description

For details, see the user guide.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

GET /v2/oauth/authorize HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

domain_id

string

Yes

The domain ID.

client_id

string

Yes

The client ID assigned when you create an app.

47eUHhrzgWBvlLWj

redirect_uri

string

Yes

The redirect URI specified when you created the app. This URI must be URL-encoded.

https%3A%2F%2Fwww.aliyunpds.com%2Fsign%2Fcallback

scope

array

No

The requested permissions. If omitted, the request defaults to all permissions.

string

No

Currently, you can only request all permissions for the app. Set this parameter to all or omit it.

all

response_type

string

Yes

The response type. This parameter must be set to code.

code

state

string

No

A value to maintain state between the request and callback. This value is returned to your redirect URI. We recommend using this parameter to prevent cross-site request forgery (CSRF) attacks.

customdata

login_type

string

Yes

The authentication method. Valid values:

  • default (The default PDS login page that integrates all authentication methods)

  • ding (Log in on a PC by scanning a QR code with DingTalk)

  • ding_sns (Log in on a mobile phone with a DingTalk username and password)

  • ram (Log in with an Alibaba Cloud RAM user)

  • wechat (Log in with WeCom by scanning a QR code)

  • wechat_app (Single Sign-On (SSO) within the WeCom app)

default

hide_consent

boolean

No

Specifies whether to hide the consent page. Default value: false.

true

Response elements

Element

Type

Description

Example

None defined.

Examples

Success response

JSON format

{}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.