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_profile
friends_list
presence
country
GET
https://www.epicgames.com/id/authorize
?
client_id={{oauth.client_id}}
&
redirect_uri={{oauth.redirect_uri}}
&
response_type=code
&
scope={{oauth.space_separated_scopes}}
POST
https://api.epicgames.dev/epic/oauth/v2/token
content-type: application/x-www-form-urlencoded
accept: application/json
redirect_uri={{oauth.redirect_uri}}
&
grant_type=authorization_code
&
code={{oauth.code}}
&
deployment_id={{custom_fields.deployment_id}}
POST
https://api.epicgames.dev/epic/oauth/v2/token
content-type: application/x-www-form-urlencoded
accept: application/json
grant_type=refresh_token
&
refresh_token={{oauth.refresh_token}}