feat(automation_tokens): Add support for automation-tokens #547
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR aims to add support for Automation Tokens, as requested in #474.
There are a few things worth mentioning about this implementation, mostly due to the Automation Tokens docs being inaccurate.
DELETE
doesn't work for the/automation-tokens
endpoint. The examples don't work as documented, and inspecting requests in the web UI using developer tools shows the web UI using the/tokens
endpoint, even for automation tokens. (it appears to be an issue with the endpoint expecting acustomer_id
in the request, but there is no documentation on it being required or how to pass it in the request)/automation-tokens/{id}/services
is supposed to return a list of services associated with the provided token id, also doesn't appear to work, so I haven't included it in this PR, but the same can be achieved usingGetAutomationToken
and accessing theServices
field of the returnedAutomationToken
.