Authentication when creating Webhooks - clio-api

Consider this scenario: I have an integration API that communicates with Clio. There are several clients (unique Clio accounts) each with different users that will integrate with the API aka the Clio Application.
I want to use the Clio webhooks but should I create a new webhook for each authorised user or can I have one per client? The Webhook is created using a user's access token and is therefore tied to the access token. However, other users within the same Clio account with authorisation to the same event will trigger all the webhooks?
Can I register 1 wehbook per client or is it per user?

As I understand, you should use one Clio API token for each Clio client and you should create webhooks on events for each model, not for each user. For example, if you wanted to get a webhook request to your web service for each time a user adds an activity, you would set up the webhook on the activity update event, once. Each time an activity is updated, Clio would make a webhook call to your service for that client. Then each user's interface for that client would check the central repository for that update.

Related

Azure DEVOPS make pull request using on-behalf-of flow

I am trying to figure out what is needed so that my application is able to make a pull request on behalf of my user.
I have an app registration, for this app registration I am requesting the following API permission:
https://app.vssps.visualstudio.com/user_impersonation
Once the user accesses my REST API with a proper bearer token, I need to obtain the on-behalf token so that I may contact the Azure Devops APIs.
Question is what scopes do I need to request for the on-behalf-of token so that I may create pull requests as my authenticated user?
The git repo to which I'm trying to create the pull request is hosted on o365exchange.visualstudio.com.
to create pull request on Azure DevOps Serivces side, you could call the rest api: POST https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullrequests?api-version=6.0
You could find the needed scope under the doc:
You could find the corresponding scope details in the doc:
When you register your app, you could choose it here:
I hope this could do some help. Thanks.

How to link user to purchase token on a google subscription renewal

While using Unity 2020.3.9f1 and Unity IAP 3.2.1 I can send the initial subscription via a regular https request to my Spring backend and receive the user information from backend auth + purchase token via the request. I can then insert the expiry date (which I query from Google API using AndroidPublisher and the token) to my database and give premium features to the given user for that time period.
When the subscription is about to renew, I need to update the users premium feature expiry date in the database accordingly.
I already found out, that I can receive this renewal information, even if the client is not active, via Google Cloud Pub/Sub by linking it with the apps monetization. The backend then receives a purchase token, but this time there is no more user information since the request was not issued through a client/server request.
I also figured out that there is/was a developer payload to use for that purpose. My question is how I can add this to the subscription to link renewal subscription notifications to a certain user on receiving renewal subscription notifications. I do not really want to add a new index on a (at least in test mode always unique) purchase token to my database if I do not have to.
I use Firebase Auth in my app - can I make use of that in any way?

access youtube analytics api via content manager account's client id

We have content manager account which has been granted to access to all channels we have.
We do authorization procedure for each service accounts to get access tokens for analytics-API,
it works well, but it also demands when new channel is added.
Is it possible that issuing an access token via client id of content manager account, and use it to call API to access all channels that content manager account handles?
Youtube api is channel + user based. Each access token is authorized to access a single user + channel.
If you have five channels you will need to login five times and each access token you get back will have access to the single channel.
I found that I can call api with id set 'contentOnwer==id_of_content_manager'. And it is able to access to all data from channels this account manages.

Perform CRUD in REST API with URL

I'm using Stripe API(REST) and I need to put a link in email where user can directly unsubscribe/delete subscription(https://stripe.com/docs/billing/subscriptions/canceling-pausing).
I need to know if it is possible to put the arguments and operation in a URL so that when user clicks it, Stripe api is called and subscription is cancelled.
thanks in advance.
The short answer is NO.
Cancelling subscriptions from Stripe API requires your Secret Key which you should NEVER expose in the front end and made public because user will have access to your stripe account in that case.
Saying that, what you could do is to expose an endpoint in your own web server, which you will need to
1) create a on time use token which you can look up your customer and related subscriptions; include the token in your URL send to the user
2) when user click the the url, verify the token (valid non expired) and find the customer and subscriptions
3) Call stripe API with your secret keys to cancel the subscription for the customer.

How do I get scope(s) when requesting token from 3rd party to do transaction list on their account?

My app allows third party users to login via PayPal and to authorise it to collect UserInfo such as name and address. I now want to get permission to do a transaction list on their account using the token they provide.
I get 401 Not Authorized using the current tokens and OAuth won't accept 'https://api.paypal.com/v1/payments/.*' as a scope.
Calling api.paypal.com/v1/Payments on behalf of third parties isn't currently supported using the REST APIs.
You can only get payment info (and transaction info) for yourself.
In order to get Transaction data on behalf of third parties, you need to use the Classic APIs, first using the Permission Services to request access, then use the Merchant API Services to get transaction data.
Edit: Jan 6th, 2016
To make requests on behalf of third-parties, you need to use the Permissions Services API to request the proper scope.
As far as I can tell (from reading the documentation), you still cannot request 3rd party payment data using the REST api. You must use the Classic Name-Value Pair/SOAP api.