---
title: "How to resolve error when using GitHub profiles"
canonical: "https://support.appfire.com/space/SUPPORT/3455549762/How%20to%20resolve%20error%20when%20using%20GitHub%20profiles"
format: markdown
---
This article explains how to resolve errors that occur when using the **Markdown from a URL** macro with a GitHub repository in Confluence Cloud.

![image-20260715-125810.png](media://b9ddfd14-e987-4714-8a36-d140f1501061)

![image-20260715-130239.png](media://70948319-a7c9-467b-be27-655e88060427)

## Solution

### Step 1: Create a GitHub profile

1. Navigate to **Confluence administration** > **Manage apps** > **Markdown for Confluence** > **Profiles**.
2. Create a new profile.
3. Select **GitHub** as the profile type.
4. Specify the API URL: [https://api.github.com/repos](https://api.github.com/repos).
5. Enter your GitHub username.
6. Enter the [personal access token](https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line) for your GitHub profile in the **Access token** field.

### Step 2: Use the profile in the Markdown from a URL macro

1. Add the **Markdown from a URL** macro to the page.
2. Select the profile you created, for example, **Priyal**.
3. In the **Markdown from a URL** macro, the URL field must use the GitHub API path format, not the browser URL: `{username}/test/contents/README.md?ref=main`

> Breaking it down:
> 
> - `{username}` is the repository owner.
> - `test` is the repository name.
> - `contents/README.md` is the file path, prefixed with `contents/`.
> - `?ref=main` is the branch name.
> - The profile API URL, `https://api.github.com/repos`, is prepended automatically. The full API call becomes:

```
https://api.github.com/repos/{username}/test/contents/README.md?ref=main
```

![image-20260715-125418.png](media://f101da6f-0753-4c29-9dd1-346db8033382)

Reference: [https://appfire.atlassian.net/wiki/x/5yBQBQ](https://appfire.atlassian.net/wiki/x/5yBQBQ)