You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use the your SQL example, I get the following json string back:{"access_token":"5f36e31256c2db5ec3d68f6b5206aafa23c6ab6f","expires_in":3600,"token_type":"Bearer","scope":"api"}
I was expecting to get back the json result of the API I was calling in the @Audience variable. Here's the SQL example I am using:
Do you see anything odd with the SQL? The bearer token I get back in the string doesn't work when I try calling the @Audience URL in Postman using Bearer Token Authorization.
Sean
The text was updated successfully, but these errors were encountered:
Hi Geral,
When I use the your SQL example, I get the following json string back:{"access_token":"5f36e31256c2db5ec3d68f6b5206aafa23c6ab6f","expires_in":3600,"token_type":"Bearer","scope":"api"}
I was expecting to get back the json result of the API I was calling in the @Audience variable. Here's the SQL example I am using:
DECLARE @wurl VARCHAR(MAX) = 'https://westshorelms.docebosaas.com/oauth2/token'
DECLARE @Header VARCHAR(MAX) = '[]'
DECLARE @grant_type VARCHAR(20) = 'client_credentials'
DECLARE @client_id VARCHAR(15) = 'xxx'
DECLARE @client_secret VARCHAR(40) = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
DECLARE @Audience VARCHAR(100) = 'https://westshorelms.docebosaas.com/manage/v1/user'
DECLARE @Body VARCHAR(MAX) = CONCAT('grant_type=',@grant_type,'&client_id=',@client_id,'&client_secret=',@client_secret,'&audience=',@Audience)
DECLARE @results AS TABLE (Context VARCHAR(MAX) NOT NULL)
INSERT INTO @results EXEC dbo.APICaller_POST_Encoded @url = @wurl, @headers = @Header, @JsonBody = @Body
SELECT Context FROM @results
Do you see anything odd with the SQL? The bearer token I get back in the string doesn't work when I try calling the @Audience URL in Postman using Bearer Token Authorization.
Sean
The text was updated successfully, but these errors were encountered: