Thank you both. I've validated the key and secret using Postman and curl, and even native python code, but still getting a failure with the dap client:
~ # dap --loglevel debug --base-url https://api-gateway.instructure.com --client-id "${CLIENT_ID}" --client-secret "${SECRET}" schema --table wikis
2023-04-25 17:10:09,005 - DEBUG - Using selector: EpollSelector (selector_events.py:54)
2023-04-25 17:10:09,006 - DEBUG - Client region: us-east-1 (api.py:78)
2023-04-25 17:10:09,006 - DEBUG - Get schema of table: wikis (api.py:343)
2023-04-25 17:10:09,006 - DEBUG - Authenticating to DAP in region us-east-1 (api.py:289)
2023-04-25 17:10:09,338 - DEBUG - GET/POST response payload:
{'message': 'The client is not authorized to perform this operation.'} (api.py:269)
2023-04-25 17:10:09,338 - WARNING - Received error in response: {'message': 'The client is not authorized to perform this operation.'} (api.py:275)
2023-04-25 17:10:09,341 - DEBUG - Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/dap/__main__.py", line 126, in console_entry
main()
File "/usr/lib/python3.10/site-packages/dap/__main__.py", line 115, in main
asyncio.run(dapCommand.execute(args))
File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
return future.result()
File "/usr/lib/python3.10/site-packages/dap/commands/commands.py", line 31, in execute
executed = await super().execute(args)
File "/usr/lib/python3.10/site-packages/dap/commands/base.py", line 49, in execute
if await subcommand.execute(args):
File "/usr/lib/python3.10/site-packages/dap/commands/base.py", line 45, in execute
await self._execute_impl(args)
File "/usr/lib/python3.10/site-packages/dap/commands/commands.py", line 181, in _execute_impl
await session.download_table_schema(
File "/usr/lib/python3.10/site-packages/dap/api.py", line 360, in download_table_schema
versioned_schema = await self.get_table_schema(namespace, table)
File "/usr/lib/python3.10/site-packages/dap/api.py", line 344, in get_table_schema
versioned_schema = await self._get(
File "/usr/lib/python3.10/site-packages/dap/api.py", line 169, in _get
return await self._process(response, response_type)
File "/usr/lib/python3.10/site-packages/dap/api.py", line 276, in _process
raise error_object
dap.dap_error.ServerError: {'message': 'The client is not authorized to perform this operation.'}
(__main__.py:140)
2023-04-25 17:10:09,341 - ERROR - {'message': 'The client is not authorized to perform this operation.'} (__main__.py:141)
On the same server with curl:
curl --request POST https://api-gateway.instructure.com/ids/auth/login --user "${CLIENT_ID}:${SECRET}" --data-urlencode 'grant_type=client_credentials'
{"access_token":"eyJhbG...etc....etc.