Was this helpful?

See all management resources

Using the App services API, you can authorize a client.

Authorizing a client

Use the GET method to authorize a client.

Request URI

GET /management/authorize?response_type={response_type}&client_id={client_id}


Parameter Description
string response_type The OAuth 2.0 response type.
string client_id Organization client ID


Example - Request

curl -X GET "https://api.usergrid.com/management/authorize?response_type=token&client_id=b0U5N81ME96NSeG78xIxQFxelQ"

It is recommended that you use the Admin Portal for administrative activities instead of using JavaScript to do them programmatically in your app.

Note: You can see the response below in the Admin Portal by using the JavaScript Console.

The example assumes use of the Ruby SDK.

mgmt = Usergrid::Management.new 'https://api.usergrid.com/'
mgmt['authorize'].get params: { response_type: 'token', client_id: 'b0U5N81ME96NSeG78xIxQFxelQ'}

The example assumes use of the Node.js module.

var options = {
    qs:{response_type:'token', client_id:'b0U5N81ME96NSeG78xIxQFxelQ'}
client.request(options, function (err, data) {
    if (err) {
        //error — GET failed
    } else {
        //success — data will contain raw results from API call       

Example - Response

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
	<title>Sign In</title>
	<link rel="stylesheet" type="text/css" href="../css/styles.css" />

	<div class="dialog-area">
		<form class="dialog-form" action="" method="post">
			<input type="hidden" name="response_type" value="token">
			<input type="hidden" name="client_id" value="b3U6M90FY80MEeG89xIxPRxEkQ">
			<input type="hidden" name="redirect_uri" value="">
			<input type="hidden" name="scope" value="">
			<input type="hidden" name="state" value="">
					<label for="username">Username</label>
					<input class="text_field" id="username" name="username" type="text" />
					<label for="password">Password</label>
					<input class="text_field" id="password" name="password" type="password" />
				<p class="buttons">
					<button type="submit">Submit</button>

Add new comment

Provide your email address if you wish to be contacted offline about your comment.
We will not display your email address as part of your comment.

We'd love your feedback and perspective! Please be as specific as possible.
Type the characters you see in this picture. (verify using audio)

Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.