Skip to main content

User Oauth Client Actions

https://api.losant.com/me/oauth-clients/CLIENT_ID

Below are the various requests that can be performed against the User Oauth Client resource, as well as the expected parameters and the potential responses.

Delete​

Deletes a private OAuth client

Method And Url​

DELETE https://api.losant.com/me/oauth-clients/CLIENT_ID

Authentication​

A valid API access token is required to access this endpoint. The token must include at least one of the following scopes: all.User, only.User, userOauthClient.*, or userOauthClient.delete.

Request Path Components​

Path ComponentDescriptionExample
CLIENT_IDID associated with the OAuth client575ec7417ae143cd83dc4a95

Request Headers​

NameRequiredDescriptionDefault
AuthorizationYThe token for authenticating the request, prepended with Bearer

Curl Example​

curl -H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_API_ACCESS_TOKEN' \
-X DELETE \
https://api.losant.com/me/oauth-clients/CLIENT_ID

Successful Responses​

CodeTypeDescription
200SuccessIf OAuth client was successfully deleted

Error Responses​

CodeTypeDescription
400ErrorError if malformed request
404ErrorError if OAuth client was not found

Get​

Retrieves information on a private OAuth client

Method And Url​

GET https://api.losant.com/me/oauth-clients/CLIENT_ID

Authentication​

A valid API access token is required to access this endpoint. The token must include at least one of the following scopes: all.User, all.User.bounded, all.User.read, only.User, only.User.bounded, only.User.read, userOauthClient.*, or userOauthClient.get.

Request Path Components​

Path ComponentDescriptionExample
CLIENT_IDID associated with the OAuth client575ec7417ae143cd83dc4a95

Request Headers​

NameRequiredDescriptionDefault
AuthorizationYThe token for authenticating the request, prepended with Bearer

Curl Example​

curl -H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_API_ACCESS_TOKEN' \
-X GET \
https://api.losant.com/me/oauth-clients/CLIENT_ID

Successful Responses​

CodeTypeDescription
200User OAuth ClientOAuth client information

Error Responses​

CodeTypeDescription
400ErrorError if malformed request
404ErrorError if OAuth client was not found

Patch​

Updates information about a private OAuth client

Method And Url​

PATCH https://api.losant.com/me/oauth-clients/CLIENT_ID

Authentication​

A valid API access token is required to access this endpoint. The token must include at least one of the following scopes: all.User, only.User, userOauthClient.*, or userOauthClient.patch.

Request Path Components​

Path ComponentDescriptionExample
CLIENT_IDID associated with the OAuth client575ec7417ae143cd83dc4a95

Request Headers​

NameRequiredDescriptionDefault
AuthorizationYThe token for authenticating the request, prepended with Bearer

Request Body​

The body of the request should be serialized JSON that validates against the User OAuth Client Patch schema. For example, the following would be a valid body for this request:

{
"client_name": "Updated Private Client Name",
"description": "Updated description",
"redirect_uris": [
"https://example.com/new-callback"
]
}

Curl Example​

curl -H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_API_ACCESS_TOKEN' \
-X PATCH \
-d '{"client_name":"Updated Private Client Name","description":"Updated description","redirect_uris":["https://example.com/new-callback"]}' \
https://api.losant.com/me/oauth-clients/CLIENT_ID

Successful Responses​

CodeTypeDescription
200User OAuth ClientUpdated OAuth client information

Error Responses​

CodeTypeDescription
400ErrorError if malformed request
404ErrorError if OAuth client was not found

Schemas​

Error​

Schema for errors returned by the API

Error Schema​

  • ▶
    {} 3 keys
    • "http://json-schema.org/draft-07/schema#"
    • "object"
    • ▶
      {} 3 keys
      • ▶
        {} 1 key
        • ▶
          {} 1 key
          • ▶
            {} 2 keys

        Error Example​

        • ▶
          {} 2 keys
          • "NotFound"
          • "Application was not found"

        Success​

        Schema for reporting a successful operation

        Success Schema​

        • ▶
          {} 3 keys
          • "http://json-schema.org/draft-07/schema#"
          • "object"
          • ▶
            {} 1 key
            • ▶
              {} 2 keys

          Success Example​

          • ▶
            {} 1 key
            • true

          User OAuth Client​

          Schema for a single private OAuth client

          User OAuth Client Schema​

          • ▶
            {} 3 keys
            • "http://json-schema.org/draft-07/schema#"
            • "object"
            • ▶
              {} 17 keys
              • ▶
                {} 2 keys
                • ▶
                  {} 2 keys
                  • ▶
                    {} 2 keys
                    • ▶
                      {} 2 keys
                      • ▶
                        {} 2 keys
                        • ▶
                          {} 3 keys
                          • ▶
                            {} 2 keys
                            • ▶
                              {} 3 keys
                              • ▶
                                {} 4 keys
                                • ▶
                                  {} 5 keys
                                  • ▶
                                    {} 3 keys
                                    • ▶
                                      {} 3 keys
                                      • ▶
                                        {} 3 keys
                                        • ▶
                                          {} 4 keys
                                          • ▶
                                            {} 4 keys
                                            • ▶
                                              {} 3 keys
                                              • ▶
                                                {} 3 keys

                                            User OAuth Client Example​

                                            • ▶
                                              {} 17 keys
                                              • "575ec7417ae143cd83dc4a95"
                                              • "2016-06-13T04:00:00.000Z"
                                              • "2016-06-13T04:00:00.000Z"
                                              • "575ec7417ae143cd83dc4a95"
                                              • "8f14e45fceea167a5a36dedd4bea2543"
                                              • "My Private Client"
                                              • "Private OAuth client for automation"
                                              • "https://example.com"
                                              • "https://example.com/logo.png"
                                              • ▶
                                                [] 1 item
                                                • ▶
                                                  [] 2 items
                                                  • ▶
                                                    [] 1 item
                                                    • "client_secret_basic"
                                                    • ▶
                                                      [] 2 items
                                                      • ▶
                                                        [] 1 item
                                                        • "https://example.com/tos"
                                                        • "https://example.com/privacy"

                                                      User OAuth Client Patch​

                                                      Schema for the body of a private OAuth client modification request

                                                      User OAuth Client Patch Schema​

                                                      • ▶
                                                        {} 4 keys
                                                        • "http://json-schema.org/draft-07/schema#"
                                                        • "object"
                                                        • ▶
                                                          {} 10 keys
                                                          • ▶
                                                            {} 3 keys
                                                            • ▶
                                                              {} 2 keys
                                                              • ▶
                                                                {} 1 key
                                                                • ▶
                                                                  {} 1 key
                                                                  • ▶
                                                                    {} 5 keys
                                                                    • ▶
                                                                      {} 3 keys
                                                                      • ▶
                                                                        {} 4 keys
                                                                        • ▶
                                                                          {} 4 keys
                                                                          • ▶
                                                                            {} 1 key
                                                                            • ▶
                                                                              {} 1 key
                                                                            • false

                                                                          User OAuth Client Patch Example​

                                                                          • ▶
                                                                            {} 3 keys
                                                                            • "Updated Private Client Name"
                                                                            • "Updated description"
                                                                            • ▶
                                                                              [] 1 item

                                                                            Was this page helpful?


                                                                            Still looking for help? You can also search the Losant Forums or submit your question there.