OAuth2 Token Endpoint
POST
/oauth2/token
const url = 'https://auth.partner.mybudsense.com/oauth2/token';const options = { method: 'POST', headers: {'Content-Type': 'application/x-www-form-urlencoded'}, body: new URLSearchParams({ client_id: 'your-client-id', client_secret: 'your-client-secret', grant_type: 'client_credentials', scope: 'budsense/read' })};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://auth.partner.mybudsense.com/oauth2/token \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data client_id=your-client-id \ --data client_secret=your-client-secret \ --data grant_type=client_credentials \ --data scope=budsense/readUse this endpoint to obtain an access token for the BudSense Partner API. Response will include an access_token, token_type, and expires_in time in seconds.
Request Bodyrequired
Section titled “ Request Bodyrequired ”OAuth2 client credentials grant type.
Media typeapplication/x-www-form-urlencoded
object
client_id
required
Your application’s client ID.
string
Example
your-client-idclient_secret
required
Your application’s client secret.
string
Example
your-client-secretgrant_type
required
The grant type must be ‘client_credentials’.
string
scope
required
The scope must be ‘budsense/read’.
string