This topic provides answers to some frequently asked questions about the Cloud Phone API.
Index
How do I enable authorization-free logon for my cloud phone?
To enable authorization-free logon, submit a ticket and provide the UID of your Alibaba Cloud account.
What are the authentication-related API operations for Alibaba Cloud Workspace?
The following API operations are used for Alibaba Cloud Workspace authentication:
GetAuthCode - Obtains the authentication code
This operation is called on the server side by using AccessKeyID, AccessKeySecret, or other RAM authentication methods. Since AccessKeyID and AccessKeySecret should never be stored on the client side, ensure this operation is not called from the client side.
GetStsToken - Obtains the temporary access credentials
This operation is called on the client side.
GetConnectionTicket - Obtains a connection ticket
This operation is called on the client side.
Is there a runnable Java demo available?
We offer a straightforward server-side demo for your reference.
Download it here: demo1_authcode.zip.
Procedure:
Update the following fields in the
application.propertiesconfiguration file:
Replace
service.sdk.accessKeyIdwith the AccessKey ID of your Alibaba Cloud account.Replace
service.sdk.accessSecretwith the AccessKey Secret of your Alibaba Cloud account.Replace
service.deploy.regionwith the region where the server code is deployed.
spring.application.name=demo1
logging.config=classpath:log4j2-file.xml
service.sdk.accessKeyId=<YourAccessKeyId>
service.sdk.accessSecret=<YourAccessKeySecret>
# service.deploy.region
service.deploy.region=<YourRegion>
sdk.appstream.center.endpoint=appstream-center.aliyuncs.comRun the
mainfunction to start the server locally.Run the
curlcommand to perform a test locally.
Replace <EndUserId> with the username of your convenience account.
curl -X POST http://localhost:8080/auth -H "Content-Type: application/json" -d '{"userId":"<EndUserId>", "requestId":12345678}'