Skip to main content

User Oauth Token Actions

https://api.app.wnology.io/me/oauth-tokens/OAUTH_TOKEN_ID

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

Delete​

Deletes an OAuth Token

Method And Url​

DELETE https://api.app.wnology.io/me/oauth-tokens/OAUTH_TOKEN_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, userOauthToken.*, or userOauthToken.delete.

Request Path Components​

Path ComponentDescriptionExample
OAUTH_TOKEN_IDID associated with the OAuth token575ec7417ae143cd83dc4a95

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.app.wnology.io/me/oauth-tokens/OAUTH_TOKEN_ID

Successful Responses​

CodeTypeDescription
200SuccessIf OAuth token was successfully deleted

Error Responses​

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

Get​

Retrieves information on an OAuth token

Method And Url​

GET https://api.app.wnology.io/me/oauth-tokens/OAUTH_TOKEN_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, userOauthToken.*, or userOauthToken.get.

Request Path Components​

Path ComponentDescriptionExample
OAUTH_TOKEN_IDID associated with the OAuth token575ec7417ae143cd83dc4a95

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.app.wnology.io/me/oauth-tokens/OAUTH_TOKEN_ID

Successful Responses​

CodeTypeDescription
200User OAuth TokenOAuth token information

Error Responses​

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

Patch​

Updates information about an OAuth token

Method And Url​

PATCH https://api.app.wnology.io/me/oauth-tokens/OAUTH_TOKEN_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, userOauthToken.*, or userOauthToken.patch.

Request Path Components​

Path ComponentDescriptionExample
OAUTH_TOKEN_IDID associated with the OAuth token575ec7417ae143cd83dc4a95

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 Token Patch schema. For example, the following would be a valid body for this request:

{
"name": "Updated OAuth App Name",
"description": "Updated description",
"defaultRole": "edit",
"status": "inactive"
}

Curl Example​

curl -H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_API_ACCESS_TOKEN' \
-X PATCH \
-d '{"name":"Updated OAuth App Name","description":"Updated description","defaultRole":"edit","status":"inactive"}' \
https://api.app.wnology.io/me/oauth-tokens/OAUTH_TOKEN_ID

Successful Responses​

CodeTypeDescription
200User OAuth TokenUpdated OAuth token information

Error Responses​

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

Schemas​

Error​

Schema for errors returned by the API

Error Schema​

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

      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 Token​

        Schema for a single OAuth Token

        User OAuth Token Schema​

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

                                User OAuth Token Example​

                                • ▶
                                  {} 11 keys
                                  • "575ec7417ae143cd83dc4a95"
                                  • "575ec7417ae143cd83dc4a95"
                                  • "My OAuth App"
                                  • "OAuth application for automation"
                                  • "2016-06-13T04:00:00.000Z"
                                  • "2016-06-13T04:00:00.000Z"
                                  • ▶
                                    [] 2 items
                                    • "view"
                                    • [] 0 items
                                      • "active"
                                      • ▶
                                        {} 6 keys

                                      User OAuth Token Patch​

                                      Schema for the body of an OAuth Token modification request

                                      User OAuth Token Patch Schema​

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

                                                User OAuth Token Patch Example​

                                                • ▶
                                                  {} 4 keys
                                                  • "Updated OAuth App Name"
                                                  • "Updated description"
                                                  • "edit"
                                                  • "inactive"

                                                Was this page helpful?


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