Skip to content

Commit 47e868e

Browse files
committed
Update Cursors.ps1
1 parent a9f9d61 commit 47e868e

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

Scripts/Cursors.ps1

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
# Get access token
55
# https://www.deviantart.com/developers/authentication
6+
67
$Body = @{
78
grant_type = "client_credentials"
89
client_id = $env:DEVIANTART_CLIENT_ID
@@ -11,6 +12,7 @@ $Body = @{
1112
$Parameters = @{
1213
Uri = "https://www.deviantart.com/oauth2/token"
1314
Body = $Body
15+
Method = "Post"
1416
Verbose = $true
1517
UseBasicParsing = $true
1618
}
@@ -19,12 +21,12 @@ $Response = Invoke-RestMethod @Parameters
1921
# Get download URL
2022
# https://www.deviantart.com/developers/http/v1/20240701/deviation_download/bed6982b88949bdb08b52cd6763fcafd
2123
# UUID is 8A8DC033-242C-DD2E-EDB0-CC864772D5F4
22-
$Body = @{
23-
access_token = $Response.access_token
24+
$Headers = @{
25+
Authorization = "Bearer $($Response.access_token)"
2426
}
2527
$Parameters = @{
2628
Uri = "https://www.deviantart.com/api/v1/oauth2/deviation/download/8A8DC033-242C-DD2E-EDB0-CC864772D5F4"
27-
Body = $Body
29+
Headers = $Headers
2830
Verbose = $true
2931
UseBasicParsing = $true
3032
}

0 commit comments

Comments
 (0)