1.0.4 • Published 4 years ago
@getcolo/colo-link v1.0.4
colo-link
Install
yarn add @getcolo/colo-link
Usage
import React, { Component } from 'react'
import ColoLink from '@getcolo/colo-link'
import '@getcolo/colo-link/dist/index.css'
const App = () => {
return (
<ColoLink
scope={'calls:read calls:write'}
integration={'slack'}
userId={"your end-user's id"}
clientId={'oauth app client id'}
redirectUrl={'http://localhost:3000'}
/>
)
}
Component Reference
ColoLink
(without using https://getcolo.dev service)
integration
(required) - the provider you're integrating with e.g. 'slack'userId
(required) - the user id you're linking the request with (maps to thestate
value, which you can query on your callback handler to associate the retrieved access token with the sameuserId
)clientId
(required) - your OAuth app's client_idredirectUrl
(required) - the url of the callback handler i.e. where the user will be directed to after the authorization screenscope
(required) - the scopes your app is requesting that reflects the operations it will be able to perform against the end user.
(with https://getcolo.dev service)
integration
(required) - the provider you're integrating with e.g. 'slack'userId
(required) - the user id you're linking the request with (maps to thestate
value, which you can query on your callback handler to associate the retrieved access token with the sameuserId
)coloApiKey
(required) - the api key generated from your Colo application
License
MIT © getcolo