How to use postman's aws-signature(using aws-iot rest api) into android application?
<ol>
<li>Now i need to get thing shadow from aws-iot api.so when i hit same request into postman got 200ok in response.</li>
<li>From the app-side i got 403 i.e.forbidden.</li>
<li>Here i used "okhttp client" for fetch the request.</li>
</ol>

<p>also attached image where i got 200ok response.</p>

<p><a href="https://i.stack.imgur.com/ZW7pL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZW7pL.png" alt="get thing shadow from aws-iot api 200ok response"></a></p>

<p>Now what i do from app side?I think its permission issue but not able to resolved please suggest.</p>

<p>also attached code as follows:-</p>

<pre><code>Interceptor interceptor = new Interceptor() {
@Override
public okhttp3.Response intercept(Interceptor.Chain chain) throws IOException {
Request newRequest = chain.request()
.newBuilder()
.addHeader("content-type", "application/x-www-form-urlencoded")
.addHeader("host", "ag7fce49bf5ti.iot.us-east-1.amazonaws.com")
.addHeader("x-amz-date", "20160919T054450Z")
.addHeader("authorization", "AWS4-HMAC-SHA256 Credential=AKIAJ6XB3CLURFLV6ISQ/20160919/us-east-1/iotdata/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=af7cd8cee7dd4763cff3a1c8f91cdde1fa22cc68012248a694cee098981bc623")
.build();
return chain.proceed(newRequest);
}
};

    OkHttpClient.Builder builder = new OkHttpClient.Builder();
    builder.interceptors().add(interceptor);
    client = builder.build();

    Retrofit retrofit = new Retrofit.Builder()
            .baseUrl("https://ag7fce49bf5ti.iot.us-east-1.amazonaws.com/things/dm_project/shadow/")
            //.addConverterFactory(client)
            .client(client)
            .build();
</code></pre>