Registering Your API Client Application in Embarcadero Connect

From Connect
Jump to: navigation, search

Go Up to Obtaining Authorization to Use the API

In order to obtain authorization to access the Embarcadero Connect API you must register your client application in the running instance of Embarcadero Connect that you want to access.

To register your application in the target instance of Embarcadero Connect, perform an API request with the following parameters:

Note: The specified "clientId" and "secret" must be those that you previously registered with Embarcadero.
Item Value

URL

http://connect.example.com/api/v1/clients

Method

POST

Headers

Content-Type

application/json

Body

{
    // Mandatory Fields

    "clientId":            // An UUID that uniquely identifies your client application.
        "6a2a39ba-9688-493d-b348-187468f599ae",

    "secret":              // The secret of your client application.
        "a28e0ca4-27cb-4361-bf97-3b26c612d66a",

    "name": "My App",      // The name of your client application.
    "description":         // A description of your client application.
        "My custom API client application",

    "clientType": "1",     // The type of your client application, which may be any of the following:
                           // • Web Application ("0").
                           // • Native Application ("1").

    // Optional Fields

    "nativeType": "4",     // If you choose "clientType": "1", use this property to specify which platform your client
                           // application supports. You may use any of the following values:
                           // • Windows ("0").
                           // • Mac OS X ("1").
                           // • Android ("2").
                           // • iOS ("3").
                           // • Other ("4").

    "home":                // Your client application home page.
        "http://myapp.example.com",

    "image":               // A direct link to an image that represents your client application.
        "http://myapp.example.com/logo.png",

    "redirectURL":         // The OAuth callback URL of your client application.
        "http://myapp.example.com/oauthcallback",

    "stewards": [          // A list with the username of EDN users that are stewards of your client application.
        { "name": "Jane" },
        { "name": "John" }
    ]
}

If your request is successful, you get the following response:

{
    "client": {
    
        // Here go the fields in your request, with the exception of the "secret" of your client application.
        // Two additional fields are returned:
        
        "type": "client",

        "url":             // URL that you can use to update, delete and get your client application data from the API.
            "http://localhost:80/api/v1/clients/6a2a39ba-9688-493d-b348-187468f599ae"
    }
}

Once your client is registered in the target instance of Embarcadero Connect, you can obtain an API authorization token to obtain further access to the API.

See Also