import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
epic_games: {
type: "app",
app: "epic_games",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.epicgames.dev/epic/id/v2/accounts`,
headers: {
Authorization: `Bearer ${this.epic_games.$auth.oauth_access_token}`,
},
params: {
accountId: `your_account_id`,
},
})
},
})
Epic Games uses OAuth authentication. When you connect your Epic Games account, Pipedream will open a popup window where you can sign into Epic Games and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Epic Games API.
Pipedream requests the following authorization scopes when you connect your account:
basic_profilefriends_listpresencecountryGEThttps://www.epicgames.com/id/authorize?client_id={{oauth.client_id}}&redirect_uri={{oauth.redirect_uri}}&response_type=code&scope={{oauth.space_separated_scopes}}POSThttps://api.epicgames.dev/epic/oauth/v2/tokencontent-type: application/x-www-form-urlencodedaccept: application/jsonredirect_uri={{oauth.redirect_uri}}&grant_type=authorization_code&code={{oauth.code}}&deployment_id={{custom_fields.deployment_id}}POSThttps://api.epicgames.dev/epic/oauth/v2/tokencontent-type: application/x-www-form-urlencodedaccept: application/jsongrant_type=refresh_token&refresh_token={{oauth.refresh_token}}