adobe-apiplatform / umapi-documentation

Documentation Development for User Management API
https://adobe-apiplatform.github.io/umapi-documentation/
MIT License
13 stars 16 forks source link

403 Forbidden when using UMAPI to create user but works when listing users #47

Closed alcazes closed 4 years ago

alcazes commented 4 years ago

Using the UMAPI I able to get the list of users: https://usermanagement.adobe.io/v2/usermanagement/users/C50417FE52CB33480A490D4C@AdobeOrg/0

But I am unable to create a new user using: https://usermanagement.adobe.io/v2/usermanagement/action/C50417FE52CB33480A490D4C@AdobeOrg

Body:

[{
  "user" : "test@rbs.co.uk",
  "requestID": "action_alexis_test1",
  "do" : [{
    "addAdobeID": {
      "email": "test@rbs.co.uk",
      "country": "US",
      "firstname": "Alexis",
      "lastname": "Test1",
      "option": "ignoreIfAlreadyExists"
    }
  }]
}]

I get 403 Forbidden

<html>

<head>
    <title>403 Forbidden</title>
</head>

<body>
    <center>
        <h1>403 Forbidden</h1>
    </center>
    <hr>
    <center>openresty</center>
</body>

</html>

cURL request:

curl --location --request GET 'https://usermanagement.adobe.io/v2/usermanagement/action/C50417FE52CB33480A490D4C@AdobeOrg' \
--header 'Content-type: application/json' \
--header 'Accept: application/json' \
--header 'x-api-key: [hidden]' \
--header 'Authorization: Bearer [hidden]' \
--data-raw '[{
  "user" : "test@rbs.co.uk",
  "requestID": "action_alexis_test1",
  "do" : [{
    "addAdobeID": {
      "email": "test@rbs.co.uk",
      "country": "US",
      "firstname": "Alexis",
      "lastname": "Test1",
      "option": "ignoreIfAlreadyExists"
    }
  }]
}]'
Luci2015 commented 4 years ago

The request is a POST not a GET. Have you tried that as well?

alcazes commented 4 years ago

@Luci2015 Yes it works great. Thanks for this.