diff --git a/app/src/main/java/com/plivo/plivosimplequickstart/TokenGenerator.java b/app/src/main/java/com/plivo/plivosimplequickstart/TokenGenerator.java index 88bdf3f..3d238a7 100644 --- a/app/src/main/java/com/plivo/plivosimplequickstart/TokenGenerator.java +++ b/app/src/main/java/com/plivo/plivosimplequickstart/TokenGenerator.java @@ -63,12 +63,12 @@ private void generateToken() { MediaType mediaType = MediaType.parse("application/json"); Log.d(TAG, "generateToken: sub: " + sub); Log.d(TAG, "generateToken: nbf: " + nbf); - RequestBody body = RequestBody.create(mediaType, "{\n \"iss\": \"MAY2RJNZKZNJMWOTG4NT\",\n \"sub\": \"" + sub + "\",\n \"per\": {\n \"voice\": {\n \"incoming_allow\": true,\n \"outgoing_allow\": true\n }\n },\n \"exp\": " + exp + "\n}\n"); + RequestBody body = RequestBody.create(mediaType, "{\n \"iss\": \"MAMTDLMDHIMDYXMTK5NT\",\n \"sub\": \""+ sub +"\",\n \"per\": {\n \"voice\": {\n \"incoming_allow\": true,\n \"outgoing_allow\": true\n }\n }}"); Request request = new Request.Builder() - .url("https://api.plivo.com/v1/Account/MAY2RJNZKZNJMWOTG4NT/JWT/Token") + .url("https://api.plivo.com/v1/Account/MAMTDLMDHIMDYXMTK5NT/JWT/Token") .method("POST", body) .addHeader("Content-Type", "application/json") - .addHeader("Authorization", "Basic TUFZMlJKTlpLWk5KTVdPVEc0TlQ6WWpJM1pXVmpPV0poTW1Kak5USXhNakJtTkdJeVlUUmtZVGd3TUdSaA==") + .addHeader("Authorization", "Basic TUFNVERMTURISU1EWVhNVEs1TlQ6TlRNMk16UTJZbVU0Tm1GaE1EWmtZakV5T0RnMU1qRXdZVE0wT1dZMQ==") .build(); try { /*runOnUiThread(() -> {