I've been reading through valence's API documentation, questions already asked on stackoverflow and other random websites.
Having some struggles with making any post calls to D2L using valence and PHP.
I am an amateur programmer at best but trying to do something that may help out my organization.
A little bit of background:
The user role I am using has access to create a user within D2L.
I am hosting my PHP code based on the basic sample provided by D2L on an external site.
I am using the GettingStartedSample for PHP provided by D2L.
I can easily make all sorts of GET statments
JSON Data is here as created in GettingStartedSample:
{
"OrgDefinedId": "987001250",
"FirstName": "John",
"MiddleName": "A",
"LastName": "Doe",
"ExternalEmail": "john.doe@gmail.com",
"UserName": "John.Doe@gmail.com",
"RoleId": 1307,
"IsActive": true,
"SendCreationEmail": false
}
Ultimately my question is just a yes or no question (but I'd love any more tips/details).
Given the background information above SHOULD I be able to make a post request using the GettingStartedSample?
Thanks
-Justin
Yes, you should. One thing to check is -- is your outgoing API call going to the correct route? And is it being signed as if it were a POST request and not a GET (note that the HTTP method is part of the base-string used in generating the auth tokens for the call). Also -- is 1307
a valid D2L Role ID in your Brightspace service instance?
In future, I would suggest that you visit the forums at D2L's developer community site for more timely access to their dev platform support and more direct access to the community of Brightspace Valence developers.