我采取了每一步行动
tutorial
并获得了所需的一切
information / IDs / Parameters
也看了这些
vids
.
然而,在运行的最后阶段
sample python code (flask app)
,在浏览器中打开localhost url时,我收到以下错误:
Error Details:
401 Unauthorized: Error while retrieving Embed URL
Unauthorized:
RequestId: 0b143776-bc54-492e-80bc-5401ecf32fd3
我不明白为什么
看来我拿不到代币了,401又回来了
pbiembedservice.py
作为api响应(最后一行):
class PbiEmbedService:
def get_embed_params_for_single_report(self, workspace_id, report_id, additional_dataset_id=None):
'''Get embed params for a report and a workspace
Args:
workspace_id (str): Workspace Id
report_id (str): Report Id
additional_dataset_id (str, optional): Dataset Id different than the one bound to the report. Defaults to None.
Returns:
EmbedConfig: Embed token and Embed URL
'''
report_url = f'https://api.powerbi.com/v1.0/myorg/groups/{workspace_id}/reports/{report_id}'
api_response = requests.get(report_url, headers=self.get_request_header())
其他帖子不是很有帮助,有人能帮我吗