I'm having an http error 405 Method Not Allowedobject in using php on my rest. What might be some solutions to it?
What version of Learn (3xxx.x.x) are you using and which URL are you calling?
I'm using Learn 3000.1.3 and I'm calling the learn/api/public/v1/oauth2/token
Are you using GET instead of POST?
So that's why you get the 405 - it is a POST operation (Explore APIs ).
There is some sample PHP code that might help at REST Demo Using PHP
I tried the sample rest demo php. It is still the same. Does the user who is registered with the application ID affecting the rest api?
Do you mean the user associated with the integration in Learn or your dev portal user?
For the first, it will for some operations. For example, to create a course the user needs the system.course.CREATE entitlement. The entitlements are in the API documentation under Implementation Notes. As a test, you could make the user an administrator.
For the second, I don't think it matters, until you hit the developer rate limit.
What happens if you try and get the oauth token using curl?
curl -i -X POST -u "$key:$secret" $server/learn/api/public/v1/oauth2/token -d "grant_type=client_credentials"
Got a blank page but a HTTP 200
What was the whole response you got from the curl POST?
It should look something like:
HTTP/1.1 200 OK
P3P: CP="CAO PSA OUR"
X-Blackboard-product: Blackboard Learn ™ 3000.1.2-rel.52+af05c84
Last-Modified: Fri, 17 Jan 1997 19:47:27 GMT
Expires: Sun, 17 Jan 2016 19:47:27 GMT
Content-Security-Policy: frame-ancestors 'self'
Set-Cookie: JSESSIONID=9698DB63121413C1CC40DEA6F745D172; Path=/learn/api; Secure
Date: Tue, 17 Jan 2017 19:47:29 GMT
I got the same results using curl in the command line. I can't make it work in curl in php.
Retrieving data ...