Endpoint /oauth/authorize

GET https://example.com/oauth/authorize


Allows an application to use an OAuth request (access) token to request user authorization.


The following sample sends an OAuth request (access) token to request user authorization using the "code" flow. The authorization code is returned to the given redirect URI.

# Request:
curl --request GET 'https://trial.dsserver.io/oauth/authorize?redirect_uri=https://trial.dsserver.io&client_id=yourclientid&response_type=token&state=teststate' \
    --header 'Content-Type: application/x-www-form-urlencoded'

# Response:
HTTP/1.1 302 Found
Location: https://trial.dsserver.io/oauth/redirect?code=g0ZGZmNjVmOWI&state=GGH565

Request Parameters

Name Type Value Optional
client_id String The identifier of the client named ClientID. no
response_type String The type of the requested response. Supported value are "token" and "code". no
state String DS Server will echo back the state value on the token response. no
scope String The scope of the request. no
redirect_uri String The redirect URI must exactly match one of the allowed redirect URIs for that client. no

Success Response

Status Description
Redirect On success, the request is redirected to the given redirect URI.

Error Response

Status Description
401 A 401 (Unauthorized) is returned, if the user is not authorized.
400 A 400 (Bad Request) is returned, if redirect URI is invalid.