Skip to content
This repository has been archived by the owner on Sep 7, 2022. It is now read-only.

Data Attachment #51

Open
muddasarejaz opened this issue Nov 23, 2017 · 2 comments
Open

Data Attachment #51

muddasarejaz opened this issue Nov 23, 2017 · 2 comments

Comments

@muddasarejaz
Copy link

When I attach data in json format

{
"title":"Some Title here",
"url":"https://example.com"

}

issue is that it only allows 11 character in title... Anybody can help me please???

@muddasarejaz
Copy link
Author

Hello!! anybody there???

@helenclarko
Copy link

You need to base64 encode the data.

encode64 = btoa('{"title":"This is a string","url":"https://google.com"}');
{
  'method': 'POST',  
  'path':'https://proximitybeacon.googleapis.com/v1beta1/beacons/3!00000000000000000001***/attachments',
  'body': {
    "namespacedType": "com.google.nearby/en",
    "data": encode64,
  }
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants