This article explains how admins can set up Power BI to access the Udemy Business API and consume applicable data for reporting purposes.
Please note that this guide specifically covers the process for connecting to and using the User-Course Activity API endpoint.
At this time, Udemy does not provide Power BI templates for other API endpoints. If you wish to connect to additional endpoints, you will need to create your own Power BI queries using the provided template as a reference.
- Review best practices for the Udemy Business API.
- Learn more about the Udemy Business API reference.
Setting up Power BI to access the Udemy Business API
1. Log in at your organization’s domain with admin privileges. For example, your organization URL should look similar to the following example: https://{your_domain}.udemy.com/organization/home/ .
2. Enable the API at the API integration page.
Go to Manage > Settings > APIs & Integrations > Select the API’s tab and select “Create Credentials”
(for example: https://{your_domain}.udemy.com/organization-manage-v2/settings/lms-integration/)
3. Copy the Client ID and Client Secret to a notepad from this screen and under documentation, click on the API documentation link. Then go to List user course activities on the left side bar (example: https://{your_domain}.udemy.com/developers/organization/reporting/methods/organizationusercourseactivity-list/get/).
4. Insert the client ID and client secret. This will generate the authorization token that you will use on Power BI.
5. Copy the authorization, open the file PowerBI_template and replace [insert-token] with authorization; Replace [insert-customer-domain] with yourdomain; Replace [insert-AccountID] with Organization_ID and save the file.
6. Open Power BI desktop.
7. Create a new DataSource Web, type in the home page for your organization (example: https://{your_domain}.udemy.com/), anonymous authentication.
Note: If you are getting the error “Access to resource is forbidden” with anonymous authentication, skip to step 8.
8. When it finishes connecting, click cancel and go to Get Data > Blank Query.
9. Click on Advanced Editor, select all information that you saved on PowerBI_template, and copy the template and paste it in the Advanced Editor then click Done.
10. Wait for the data to finish populating and you should now have all the data you need from the API endpoint.
- Note: If you get an error message “the column "Column1" was not found", this indicates that there is no data.