Forum Discussion
JuanmaRamon
3 years agoHonored Guest
Question on S2S IAP calls
Hi,
Using this reference documentation I was trying to do a basic test of the S2S IAP calls:
- https://developer.oculus.com/documentation/unity/ps-iap-s2s/#s2s-rest-requests
- https://developers.facebook.com/docs/facebook-login/guides/access-tokens
Test calls (replace CLIENT_ID, CLIENT_ID_SECRET and for the proper values):
curl -X GET "https://graph.facebook.com/oauth/access_token?client_id=$CLIENT_ID&client_secret=$CLIENT_ID_SECRET&grant_type=client_credentials" -v
Server response:
Note: Unnecessary use of -X or --request, GET is already inferred.
* Trying 31.13.83.8:443...
* Connected to graph.facebook.com (31.13.83.8) port 443 (#0)
* schannel: disabled automatic use of client certificate
* ALPN: offers http/1.1
* ALPN: server accepted http/1.1
* using HTTP/1.1
> GET /oauth/access_token?client_id=CLIENT_ID&client_secret=CLIENT_ID_SECRET&grant_type=client_credentials HTTP/1.1
> Host: graph.facebook.com
> User-Agent: curl/8.0.1
> Accept: */*
>
* schannel: remote party requests renegotiation
* schannel: renegotiating SSL/TLS connection
* schannel: SSL/TLS connection renegotiated
< HTTP/1.1 400 Bad Request
< Content-Type: application/json; charset=UTF-8
< WWW-Authenticate: OAuth "Facebook Platform" "invalid_client" "Error validating application. Cannot get application info due to a system error."
< facebook-api-version: v10.0
< Access-Control-Allow-Origin: *
< Strict-Transport-Security: max-age=15552000; preload
< Pragma: no-cache
< Cache-Control: no-store
< Expires: Sat, 01 Jan 2000 00:00:00 GMT
< x-fb-request-id: A-iIGEfOZdAs9Amr_mvbfdB
< x-fb-trace-id: CkOlsfxFcga
< x-fb-rev: 1007526847
< X-FB-Debug: /SmPXMGAfJ5FJJBjUfbuqAckan0jDtsbh5BfMKsjCINl8Gvogg12YYcM8x/LUvnwrRnwPBoFm+Cn65Pfpw/4Vg==
< Date: Fri, 19 May 2023 07:25:35 GMT
< Alt-Svc: h3=":443"; ma=86400
< Connection: keep-alive
< Content-Length: 178
<
{"error":{"message":"Error validating application. Cannot get application info due to a system error.","type":"OAuthException","code":101,"fbtrace_id":"A-iIGEfOZdAs9Amr_mvbfdB"}}* Connection #0 to host graph.facebook.com left intact
and
curl -d "OC|$CLIENT_ID|$CLIENT_ID_SECRET" -d "sku=test-iap" "https://graph.oculus.com/$CLIENT_ID/verify_entitlement" -v
Server response:
* Trying 31.13.83.50:443...
* Connected to graph.oculus.com (31.13.83.50) port 443 (#0)
* schannel: disabled automatic use of client certificate
* ALPN: offers http/1.1
* ALPN: server accepted http/1.1
* using HTTP/1.1
> POST /CLIENT_ID/verify_entitlement HTTP/1.1
> Host: graph.oculus.com
> User-Agent: curl/8.0.1
> Accept: */*
> Content-Length: 65
> Content-Type: application/x-www-form-urlencoded
>
* schannel: remote party requests renegotiation
* schannel: renegotiating SSL/TLS connection
* schannel: SSL/TLS connection renegotiated
< HTTP/1.1 400 Bad Request
< Vary: Origin
< Vary: Accept-Encoding
< Content-Type: application/json; charset=UTF-8
< WWW-Authenticate: OAuth "Facebook Platform" "invalid_request" "Invalid OAuth 2.0 Access Token"
< Access-Control-Allow-Origin: *
< Strict-Transport-Security: max-age=31536000; preload; includeSubDomains
< Pragma: no-cache
< Cache-Control: no-store
< Expires: Sat, 01 Jan 2000 00:00:00 GMT
< x-fb-request-id: AImbqL0umi1kQCE-bThDKbF
< x-fb-trace-id: CeWSzS9rvYS
< x-fb-rev: 1007527280
< X-FB-Debug: nUILzFOvvOBqELf8KpYHMc8COzqUpgQEFbcTP6SCiqRzJjZeHK/fHDWuaF9ofZbhcLQ5zP/2RqoEJnZipXAxmQ==
< Date: Fri, 19 May 2023 07:34:40 GMT
< Connection: keep-alive
< Content-Length: 144
<
{"error":{"message":"Invalid OAuth 2.0 Access Token","type":"OCApiException","code":190,"error_data":{},"fbtrace_id":"AImbqL0umi1kQCE-bThDKbF"}}* Connection #0 to host graph.oculus.com left intact
Am I using incorrectly this API or is it some kind of server side issue?
Thanks!
Actividad
No RepliesBe the first to reply
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 5 months ago
- 3 years ago
- 7 years ago
- 20 days ago