Urgent Help in Webservice

Urgent Help in Webservice

by Trushal Shah -
Number of replies: 5

Hi,All


 i need help in Webservice access from different URLs like currently moodle app do but due to bellow error we can do access with one URL only 


can anyone help me in this , ya some else who can help me please share hi email with me ,


its very urgent for me


while you create any external web service , the external services interface wasn't assigning a short name and which is set null , with this we cant access proper token , and without token we can't access any web service. 


Average of ratings: -
In reply to Trushal Shah

Re: Urgent Help in Webservice

by Trushal Shah -

is there any solution of this error ?

In reply to Trushal Shah

Re: Urgent Help in Webservice

by Juan Leyva -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi,

I'm sorry but I don't understand what's the exact problem you are facing to, have you tried to create the service shortname as is indicated in the text you have referenced?

Juan

In reply to Juan Leyva

Re: Urgent Help in Webservice

by Trushal Shah -

Hi,

thanks for replay ,


above my question is about error of moodle which stop me to use in multiple users like teacher student on multiple URLS, 

i am trying to get access of web service with my moodle url for example 

URL1: http://ipaddess1/moodle1

i can access websercie of root here , 


On creating role and service in moodle , as per above my question its not entering  "short name" name in db and if its blank then we are not able to access that service 


for example 


if i create new service with name of "TestService"  and save , but in db there is field with "short name " looks blank 

while o tray to access TestService web service its going to refer short name and gives no access error .

 


to create extra service,  i follow below url 

http://www.rumours.co.nz/manuals/using_moodle_web_services.htm


And where i had created login Webservcie which in response gives me token wrong 


if token wrong then we can't do any access of web services 


http://myipaddress/moodleapp/login/token.php?username=admin&password=Admin@123&service=moodle_mobile_app


Thanks 

skype: trushalshah




In reply to Trushal Shah

Re: Urgent Help in Webservice

by Juan Leyva -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi,

I suppose that the problem is you are getting a token for the mobile app service while you was expecting one for your custom service name.

Are you using the correct service name here?

http://myipaddress/moodleapp/login/token.php?username=admin&password=Admin@123&service=SERVICE_NAME

if you custom service shortname is windows8app, the correct URL would be: http://myipaddress/moodleapp/login/token.php?username=admin&password=Admin@123&service=windows8ap

Juan

In reply to Juan Leyva

Re: Urgent Help in Webservice

by Trushal Shah -

Hi,


that i am trying to do ,but moodle is not  adding sort name while i create web service and due to that i can't get access with above web service 


if you custom service shortname is windows8app, the correct URL would be: 

http://myipaddress/moodleapp/login/token.php?username=admin&password=Admin@123&service=windows8ap


service=windows8ap


where windows8ap must be short name from db , which is not inserted while we create service from admin penal 


and i have to use with different moodle url , so i can't set custom code for that 


Thanks